diff options
author | Loic Blot <loic.blot@unix-experience.fr> | 2016-10-05 09:03:55 +0200 |
---|---|---|
committer | Ner'zhul <nerzhul@users.noreply.github.com> | 2016-10-05 10:53:19 +0200 |
commit | 613797a3048907275ceebe29582b9fc2761b1f25 (patch) | |
tree | 1d8f90a75c86dd3a32a72d3789bc108042d8f65d /src/client.h | |
parent | 5f084cd98d7b3326b51320455364337539710efd (diff) | |
download | hax-minetest-server-613797a3048907275ceebe29582b9fc2761b1f25.tar.gz hax-minetest-server-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 '')
-rw-r--r-- | src/client.h | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/client.h b/src/client.h index b479062a0..fb479068f 100644 --- a/src/client.h +++ b/src/client.h @@ -462,7 +462,7 @@ public: u16 getHP(); u16 getBreath(); - bool checkPrivilege(const std::string &priv) + bool checkPrivilege(const std::string &priv) const { return (m_privileges.count(priv) != 0); } bool getChatMessage(std::wstring &message); @@ -670,11 +670,11 @@ private: std::map<int, u16> m_sounds_to_objects; // Privileges - std::set<std::string> m_privileges; + UNORDERED_SET<std::string> m_privileges; // Detached inventories // key = name - std::map<std::string, Inventory*> m_detached_inventories; + UNORDERED_MAP<std::string, Inventory*> m_detached_inventories; // Storage for mesh data for creating multiple instances of the same mesh StringMap m_mesh_data; |