aboutsummaryrefslogtreecommitdiff
path: root/src/nodedef.cpp
diff options
context:
space:
mode:
authorsfan5 <sfan5@live.de>2021-04-05 13:38:31 +0200
committerrubenwardy <rw@rubenwardy.com>2021-10-20 14:25:39 +0100
commit83e26f839d28c5d9aa75aeab7d924fcaad445007 (patch)
treeff2617af2c8d2ca1b8742c64a28bd659def66743 /src/nodedef.cpp
parentc3f7905d82e5b1201d81378dedde746caf0e2451 (diff)
downloadminetest-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.cpp4
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);
}