diff --git a/misc/net.minetest.minetest.appdata.xml b/misc/net.minetest.minetest.appdata.xml index 951bb6221..016c2b584 100644 --- a/misc/net.minetest.minetest.appdata.xml +++ b/misc/net.minetest.minetest.appdata.xml @@ -68,12 +68,14 @@ mining multiplayer - http://minetest.net - http://www.minetest.net/development/#reporting-issues - http://dev.minetest.net/Translation - http://www.minetest.net/development/#donate - http://wiki.minetest.net/FAQ - http://wiki.minetest.net + https://www.minetest.net + https://www.minetest.net/development/#reporting-issues + https://dev.minetest.net/Translation + https://www.minetest.net/development/#donate + https://wiki.minetest.net/FAQ + https://wiki.minetest.net + https://github.com/minetest/minetest + https://www.minetest.net/get-involved/ minetest diff --git a/src/client/mesh.cpp b/src/client/mesh.cpp index bec72fb5e..8a6f9b37a 100644 --- a/src/client/mesh.cpp +++ b/src/client/mesh.cpp @@ -20,7 +20,6 @@ with this program; if not, write to the Free Software Foundation, Inc., #include "mesh.h" #include "debug.h" #include "log.h" -#include "irrMap.h" #include #include #include diff --git a/src/gui/guiKeyChangeMenu.cpp b/src/gui/guiKeyChangeMenu.cpp index 719a4101a..249892950 100644 --- a/src/gui/guiKeyChangeMenu.cpp +++ b/src/gui/guiKeyChangeMenu.cpp @@ -146,7 +146,7 @@ void GUIKeyChangeMenu::regenerateGui(v2u32 screensize) core::rect rect(0, 0, 600 * s, 40 * s); rect += topleft + v2s32(25 * s, 3 * s); //gui::IGUIStaticText *t = - const wchar_t *text = wgettext("Keybindings. (If this menu screws up, remove stuff from minetest.conf)"); + const wchar_t *text = wgettext("Keybindings."); Environment->addStaticText(text, rect, false, true, this, -1); delete[] text; diff --git a/src/irrlicht_changes/CGUITTFont.cpp b/src/irrlicht_changes/CGUITTFont.cpp index 787f4cd5a..fe86adae6 100644 --- a/src/irrlicht_changes/CGUITTFont.cpp +++ b/src/irrlicht_changes/CGUITTFont.cpp @@ -59,7 +59,7 @@ struct SGUITTFace : public virtual irr::IReferenceCounted // Static variables. FT_Library CGUITTFont::c_library; -core::map CGUITTFont::c_faces; +std::map CGUITTFont::c_faces; bool CGUITTFont::c_libraryLoaded = false; scene::IMesh* CGUITTFont::shared_plane_ptr_ = 0; scene::SMesh CGUITTFont::shared_plane_; @@ -320,11 +320,11 @@ bool CGUITTFont::load(const io::path& filename, const u32 size, const bool antia // Grab the face. SGUITTFace* face = 0; - core::map::Node* node = c_faces.find(filename); - if (node == 0) + auto node = c_faces.find(filename); + if (node == c_faces.end()) { face = new SGUITTFace(); - c_faces.set(filename, face); + c_faces.emplace(filename, face); if (filesystem) { @@ -334,7 +334,7 @@ bool CGUITTFont::load(const io::path& filename, const u32 size, const bool antia { if (logger) logger->log(L"CGUITTFont", L"Failed to open the file.", irr::ELL_INFORMATION); - c_faces.remove(filename); + c_faces.erase(filename); delete face; face = 0; return false; @@ -349,7 +349,7 @@ bool CGUITTFont::load(const io::path& filename, const u32 size, const bool antia { if (logger) logger->log(L"CGUITTFont", L"FT_New_Memory_Face failed.", irr::ELL_INFORMATION); - c_faces.remove(filename); + c_faces.erase(filename); delete face; face = 0; return false; @@ -362,7 +362,7 @@ bool CGUITTFont::load(const io::path& filename, const u32 size, const bool antia { if (logger) logger->log(L"CGUITTFont", L"FT_New_Face failed.", irr::ELL_INFORMATION); - c_faces.remove(filename); + c_faces.erase(filename); delete face; face = 0; return false; @@ -372,7 +372,7 @@ bool CGUITTFont::load(const io::path& filename, const u32 size, const bool antia else { // Using another instance of this face. - face = node->getValue(); + face = node->second; face->grab(); } @@ -415,17 +415,17 @@ CGUITTFont::~CGUITTFont() //Glyphs.clear(); // We aren't using this face anymore. - core::map::Node* n = c_faces.find(filename); - if (n) + auto n = c_faces.find(filename); + if (n != c_faces.end()) { - SGUITTFace* f = n->getValue(); + SGUITTFace* f = n->second; // Drop our face. If this was the last face, the destructor will clean up. if (f->drop()) - c_faces.remove(filename); + c_faces.erase(filename); // If there are no more faces referenced by FreeType, clean up. - if (c_faces.size() == 0) + if (c_faces.empty()) { FT_Done_FreeType(c_library); c_libraryLoaded = false; @@ -585,7 +585,7 @@ void CGUITTFont::draw(const EnrichedString &text, const core::rect& positio core::ustring utext = text.getString(); // Set up our render map. - core::map Render_Map; + std::map Render_Map; // Start parsing characters. u32 n; @@ -640,7 +640,7 @@ void CGUITTFont::draw(const EnrichedString &text, const core::rect& positio page->render_colors.push_back(colors[iter.getPos()]); else page->render_colors.push_back(video::SColor(255,255,255,255)); - Render_Map.set(glyph.glyph_page, page); + Render_Map[glyph.glyph_page] = page; } if (n > 0) { @@ -673,14 +673,12 @@ void CGUITTFont::draw(const EnrichedString &text, const core::rect& positio // Draw now. update_glyph_pages(); - core::map::Iterator j = Render_Map.getIterator(); - while (!j.atEnd()) + auto it = Render_Map.begin(); + auto ie = Render_Map.end(); + while (it != ie) { - core::map::Node* n = j.getNode(); - j++; - if (n == 0) continue; - - CGUITTGlyphPage* page = n->getValue(); + CGUITTGlyphPage* page = it->second; + ++it; if (shadow_offset) { for (size_t i = 0; i < page->render_positions.size(); ++i) diff --git a/src/irrlicht_changes/CGUITTFont.h b/src/irrlicht_changes/CGUITTFont.h index 7b04ae828..9457e5b18 100644 --- a/src/irrlicht_changes/CGUITTFont.h +++ b/src/irrlicht_changes/CGUITTFont.h @@ -34,6 +34,7 @@ #include #include #include +#include #include #include "util/enriched_string.h" #include FT_FREETYPE_H @@ -345,7 +346,7 @@ namespace gui private: // Manages the FreeType library. static FT_Library c_library; - static core::map c_faces; + static std::map c_faces; static bool c_libraryLoaded; static scene::IMesh* shared_plane_ptr_; static scene::SMesh shared_plane_; diff --git a/src/unittest/test.cpp b/src/unittest/test.cpp index 4fd4b930b..e8957afd0 100644 --- a/src/unittest/test.cpp +++ b/src/unittest/test.cpp @@ -535,7 +535,7 @@ struct TestMapBlock: public TestBase parent.node.setContent(CONTENT_AIR); parent.node.setLight(LIGHTBANK_DAY, LIGHT_SUN); parent.node.setLight(LIGHTBANK_NIGHT, 0); - core::map light_sources; + std::map light_sources; // The bottom block is invalid, because we have a shadowing node UASSERT(b.propagateSunlight(light_sources) == false); UASSERT(b.getNode(v3s16(1,4,0)).getLight(LIGHTBANK_DAY) == LIGHT_SUN); @@ -562,7 +562,7 @@ struct TestMapBlock: public TestBase parent.position_valid = true; b.setIsUnderground(true); parent.node.setLight(LIGHTBANK_DAY, LIGHT_MAX/2); - core::map light_sources; + std::map light_sources; // The block below should be valid because there shouldn't be // sunlight in there either UASSERT(b.propagateSunlight(light_sources, true) == true); @@ -603,7 +603,7 @@ struct TestMapBlock: public TestBase } // Lighting value for the valid nodes parent.node.setLight(LIGHTBANK_DAY, LIGHT_MAX/2); - core::map light_sources; + std::map light_sources; // Bottom block is not valid UASSERT(b.propagateSunlight(light_sources) == false); }