diff options
author | sfan5 <sfan5@live.de> | 2021-04-05 13:38:31 +0200 |
---|---|---|
committer | rubenwardy <rw@rubenwardy.com> | 2021-10-20 14:25:39 +0100 |
commit | 83e26f839d28c5d9aa75aeab7d924fcaad445007 (patch) | |
tree | ff2617af2c8d2ca1b8742c64a28bd659def66743 /src/nodedef.cpp | |
parent | c3f7905d82e5b1201d81378dedde746caf0e2451 (diff) | |
download | minetest-83e26f839d28c5d9aa75aeab7d924fcaad445007.tar.gz minetest-83e26f839d28c5d9aa75aeab7d924fcaad445007.tar.bz2 minetest-83e26f839d28c5d9aa75aeab7d924fcaad445007.zip |
Reserve vectors before pushing and other code quality changes (#11161)
Diffstat (limited to 'src/nodedef.cpp')
-rw-r--r-- | src/nodedef.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/nodedef.cpp b/src/nodedef.cpp index 57d4c008f..a3b6b18c1 100644 --- a/src/nodedef.cpp +++ b/src/nodedef.cpp @@ -1543,10 +1543,10 @@ void NodeDefManager::deSerialize(std::istream &is) } -void NodeDefManager::addNameIdMapping(content_t i, std::string name) +void NodeDefManager::addNameIdMapping(content_t i, const std::string &name) { m_name_id_mapping.set(i, name); - m_name_id_mapping_with_aliases.insert(std::make_pair(name, i)); + m_name_id_mapping_with_aliases.emplace(name, i); } |