Replace various std::map with UNORDERED_MAP + various cleanups
This is part 2 for 5f084cd98d
Other improvements:
* Use the defined ItemGroupList when used
* make Client::checkPrivilege const
* inline some trivial functions
* Add ActiveObjectMap typedef
* Add SettingsEntries typedef
This commit is contained in:
@@ -564,14 +564,14 @@ void Schematic::applyProbabilities(v3s16 p0,
|
||||
void generate_nodelist_and_update_ids(MapNode *nodes, size_t nodecount,
|
||||
std::vector<std::string> *usednodes, INodeDefManager *ndef)
|
||||
{
|
||||
std::map<content_t, content_t> nodeidmap;
|
||||
UNORDERED_MAP<content_t, content_t> nodeidmap;
|
||||
content_t numids = 0;
|
||||
|
||||
for (size_t i = 0; i != nodecount; i++) {
|
||||
content_t id;
|
||||
content_t c = nodes[i].getContent();
|
||||
|
||||
std::map<content_t, content_t>::const_iterator it = nodeidmap.find(c);
|
||||
UNORDERED_MAP<content_t, content_t>::const_iterator it = nodeidmap.find(c);
|
||||
if (it == nodeidmap.end()) {
|
||||
id = numids;
|
||||
numids++;
|
||||
|
||||
Reference in New Issue
Block a user