forked from Mirrorlandia_minetest/minetest
Use unordered_map instead of map for craft definitions (#8432)
This commit is contained in:
parent
ad75dba87b
commit
ab322fc5aa
@ -922,7 +922,7 @@ public:
|
|||||||
|
|
||||||
// Get output, then decrement input (if requested)
|
// Get output, then decrement input (if requested)
|
||||||
output = out;
|
output = out;
|
||||||
|
|
||||||
if (decrementInput)
|
if (decrementInput)
|
||||||
def->decrementInput(input, output_replacement, gamedef);
|
def->decrementInput(input, output_replacement, gamedef);
|
||||||
/*errorstream << "Check RETURNS TRUE" << std::endl;*/
|
/*errorstream << "Check RETURNS TRUE" << std::endl;*/
|
||||||
@ -1099,9 +1099,10 @@ public:
|
|||||||
unhashed.clear();
|
unhashed.clear();
|
||||||
}
|
}
|
||||||
private:
|
private:
|
||||||
//TODO: change both maps to unordered_map when c++11 can be used
|
std::vector<std::unordered_map<u64, std::vector<CraftDefinition*> > >
|
||||||
std::vector<std::map<u64, std::vector<CraftDefinition*> > > m_craft_defs;
|
m_craft_defs;
|
||||||
std::map<std::string, std::vector<CraftDefinition*> > m_output_craft_definitions;
|
std::unordered_map<std::string, std::vector<CraftDefinition*> >
|
||||||
|
m_output_craft_definitions;
|
||||||
};
|
};
|
||||||
|
|
||||||
IWritableCraftDefManager* createCraftDefManager()
|
IWritableCraftDefManager* createCraftDefManager()
|
||||||
|
Loading…
Reference in New Issue
Block a user