summaryrefslogtreecommitdiff
path: root/src/game.cpp
diff options
context:
space:
mode:
authorLoic Blot <loic.blot@unix-experience.fr>2016-10-05 09:03:55 +0200
committerNer'zhul <nerzhul@users.noreply.github.com>2016-10-05 10:53:19 +0200
commit613797a3048907275ceebe29582b9fc2761b1f25 (patch)
tree1d8f90a75c86dd3a32a72d3789bc108042d8f65d /src/game.cpp
parent5f084cd98d7b3326b51320455364337539710efd (diff)
downloadminetest-613797a3048907275ceebe29582b9fc2761b1f25.tar.gz
minetest-613797a3048907275ceebe29582b9fc2761b1f25.tar.bz2
minetest-613797a3048907275ceebe29582b9fc2761b1f25.zip
Replace various std::map with UNORDERED_MAP + various cleanups
This is part 2 for 5f084cd98d7b3326b51320455364337539710efd Other improvements: * Use the defined ItemGroupList when used * make Client::checkPrivilege const * inline some trivial functions * Add ActiveObjectMap typedef * Add SettingsEntries typedef
Diffstat (limited to 'src/game.cpp')
-rw-r--r--src/game.cpp9
1 files changed, 4 insertions, 5 deletions
diff --git a/src/game.cpp b/src/game.cpp
index 5a3b10879..22d9ffef6 100644
--- a/src/game.cpp
+++ b/src/game.cpp
@@ -605,7 +605,7 @@ public:
void draw(s32 x_left, s32 y_bottom, video::IVideoDriver *driver,
gui::IGUIFont *font) const
{
- std::map<std::string, Meta> m_meta;
+ UNORDERED_MAP<std::string, Meta> m_meta;
for (std::deque<Piece>::const_iterator k = m_log.begin();
k != m_log.end(); ++k) {
@@ -615,8 +615,7 @@ public:
i != piece.values.end(); ++i) {
const std::string &id = i->first;
const float &value = i->second;
- std::map<std::string, Meta>::iterator j =
- m_meta.find(id);
+ UNORDERED_MAP<std::string, Meta>::iterator j = m_meta.find(id);
if (j == m_meta.end()) {
m_meta[id] = Meta(value);
@@ -643,7 +642,7 @@ public:
sizeof(usable_colors) / sizeof(*usable_colors);
u32 next_color_i = 0;
- for (std::map<std::string, Meta>::iterator i = m_meta.begin();
+ for (UNORDERED_MAP<std::string, Meta>::iterator i = m_meta.begin();
i != m_meta.end(); ++i) {
Meta &meta = i->second;
video::SColor color(255, 200, 200, 200);
@@ -659,7 +658,7 @@ public:
s32 textx2 = textx + 200 - 15;
s32 meta_i = 0;
- for (std::map<std::string, Meta>::const_iterator i = m_meta.begin();
+ for (UNORDERED_MAP<std::string, Meta>::const_iterator i = m_meta.begin();
i != m_meta.end(); ++i) {
const std::string &id = i->first;
const Meta &meta = i->second;