From a98baef5e4fedca36c8c8755ad7c8233469f6a3f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lo=C3=AFc=20Blot?= Date: Sun, 4 Jun 2017 21:00:04 +0200 Subject: C++11 patchset 2: remove util/cpp11.h and util/cpp11_container.h (#5821) --- src/nodedef.cpp | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'src/nodedef.cpp') diff --git a/src/nodedef.cpp b/src/nodedef.cpp index 98b34ea9e..6b2718636 100644 --- a/src/nodedef.cpp +++ b/src/nodedef.cpp @@ -912,12 +912,12 @@ private: // item aliases too. Updated by updateAliases() // Note: Not serialized. - UNORDERED_MAP m_name_id_mapping_with_aliases; + std::unordered_map m_name_id_mapping_with_aliases; // A mapping from groups to a list of content_ts (and their levels) // that belong to it. Necessary for a direct lookup in getIds(). // Note: Not serialized. - UNORDERED_MAP m_group_to_items; + std::unordered_map m_group_to_items; // Next possibly free id content_t m_next_id; @@ -1050,7 +1050,7 @@ inline const ContentFeatures& CNodeDefManager::get(const MapNode &n) const bool CNodeDefManager::getId(const std::string &name, content_t &result) const { - UNORDERED_MAP::const_iterator + std::unordered_map::const_iterator i = m_name_id_mapping_with_aliases.find(name); if(i == m_name_id_mapping_with_aliases.end()) return false; @@ -1080,7 +1080,7 @@ bool CNodeDefManager::getIds(const std::string &name, } std::string group = name.substr(6); - UNORDERED_MAP::const_iterator + std::unordered_map::const_iterator i = m_group_to_items.find(group); if (i == m_group_to_items.end()) return true; @@ -1282,7 +1282,7 @@ content_t CNodeDefManager::set(const std::string &name, const ContentFeatures &d i != def.groups.end(); ++i) { std::string group_name = i->first; - UNORDERED_MAP::iterator + std::unordered_map::iterator j = m_group_to_items.find(group_name); if (j == m_group_to_items.end()) { m_group_to_items[group_name].push_back( @@ -1318,7 +1318,7 @@ void CNodeDefManager::removeNode(const std::string &name) } // Erase node content from all groups it belongs to - for (UNORDERED_MAP::iterator iter_groups = + for (std::unordered_map::iterator iter_groups = m_group_to_items.begin(); iter_groups != m_group_to_items.end();) { GroupItems &items = iter_groups->second; for (GroupItems::iterator iter_groupitems = items.begin(); -- cgit v1.2.3