From: HybridDog Date: Sun, 31 Mar 2019 17:26:17 +0000 (+0200) Subject: Use unordered_map instead of map for craft definitions (#8432) X-Git-Tag: 5.1.0~259 X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=ab322fc5aa0b81375aa1d5b2e9b0a0872eecb26f;p=oweals%2Fminetest.git Use unordered_map instead of map for craft definitions (#8432) --- diff --git a/src/craftdef.cpp b/src/craftdef.cpp index 077d7e044..04e418e29 100644 --- a/src/craftdef.cpp +++ b/src/craftdef.cpp @@ -922,7 +922,7 @@ public: // Get output, then decrement input (if requested) output = out; - + if (decrementInput) def->decrementInput(input, output_replacement, gamedef); /*errorstream << "Check RETURNS TRUE" << std::endl;*/ @@ -1099,9 +1099,10 @@ public: unhashed.clear(); } private: - //TODO: change both maps to unordered_map when c++11 can be used - std::vector > > m_craft_defs; - std::map > m_output_craft_definitions; + std::vector > > + m_craft_defs; + std::unordered_map > + m_output_craft_definitions; }; IWritableCraftDefManager* createCraftDefManager()