aboutsummaryrefslogtreecommitdiff
path: root/src/nodedef.cpp
diff options
context:
space:
mode:
authorsfan5 <sfan5@live.de>2021-04-05 13:38:31 +0200
committerGitHub <noreply@github.com>2021-04-05 13:38:31 +0200
commitf0bad0e2badbb7d4777aac7de1b50239bca4010a (patch)
tree4c3115a42ac86e9a64d9e5f088fe187022885779 /src/nodedef.cpp
parent3e1904fa8c4aae3448d58b7e60545a4fdd8234f3 (diff)
downloadminetest-f0bad0e2badbb7d4777aac7de1b50239bca4010a.tar.xz
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 3dcac439f..dd862e606 100644
--- a/src/nodedef.cpp
+++ b/src/nodedef.cpp
@@ -1544,10 +1544,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);
}