mirror of
https://github.com/luanti-org/luanti.git
synced 2025-06-27 16:36:03 +00:00
Replace various std::map with UNORDERED_MAP + various cleanups
This is part 2 for 5f084cd98d
Other improvements:
* Use the defined ItemGroupList when used
* make Client::checkPrivilege const
* inline some trivial functions
* Add ActiveObjectMap typedef
* Add SettingsEntries typedef
This commit is contained in:
parent
5f084cd98d
commit
613797a304
23 changed files with 110 additions and 167 deletions
|
@ -303,7 +303,7 @@ Client::~Client()
|
|||
delete m_inventory_from_server;
|
||||
|
||||
// Delete detached inventories
|
||||
for (std::map<std::string, Inventory*>::iterator
|
||||
for (UNORDERED_MAP<std::string, Inventory*>::iterator
|
||||
i = m_detached_inventories.begin();
|
||||
i != m_detached_inventories.end(); ++i) {
|
||||
delete i->second;
|
||||
|
@ -1437,7 +1437,7 @@ Inventory* Client::getInventory(const InventoryLocation &loc)
|
|||
break;
|
||||
case InventoryLocation::DETACHED:
|
||||
{
|
||||
if(m_detached_inventories.count(loc.name) == 0)
|
||||
if (m_detached_inventories.count(loc.name) == 0)
|
||||
return NULL;
|
||||
return m_detached_inventories[loc.name];
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue