mirror of
https://github.com/luanti-org/luanti.git
synced 2025-06-27 16:36:03 +00:00
C++11 patchset 2: remove util/cpp11.h and util/cpp11_container.h (#5821)
This commit is contained in:
parent
2362d3f926
commit
a98baef5e4
59 changed files with 223 additions and 298 deletions
|
@ -912,12 +912,12 @@ private:
|
|||
// item aliases too. Updated by updateAliases()
|
||||
// Note: Not serialized.
|
||||
|
||||
UNORDERED_MAP<std::string, content_t> m_name_id_mapping_with_aliases;
|
||||
std::unordered_map<std::string, content_t> 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<std::string, GroupItems> m_group_to_items;
|
||||
std::unordered_map<std::string, GroupItems> 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<std::string, content_t>::const_iterator
|
||||
std::unordered_map<std::string, content_t>::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<std::string, GroupItems>::const_iterator
|
||||
std::unordered_map<std::string, GroupItems>::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<std::string, GroupItems>::iterator
|
||||
std::unordered_map<std::string, GroupItems>::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<std::string, GroupItems>::iterator iter_groups =
|
||||
for (std::unordered_map<std::string, GroupItems>::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();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue