From 613797a3048907275ceebe29582b9fc2761b1f25 Mon Sep 17 00:00:00 2001 From: Loic Blot Date: Wed, 5 Oct 2016 09:03:55 +0200 Subject: 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 --- src/clientiface.h | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) (limited to 'src/clientiface.h') diff --git a/src/clientiface.h b/src/clientiface.h index c09942909..8985ef71f 100644 --- a/src/clientiface.h +++ b/src/clientiface.h @@ -25,10 +25,10 @@ with this program; if not, write to the Free Software Foundation, Inc., #include "serialization.h" // for SER_FMT_VER_INVALID #include "threading/mutex.h" #include "network/networkpacket.h" +#include "util/cpp11_container.h" #include #include -#include #include class MapBlock; @@ -502,8 +502,7 @@ protected: void lock() { m_clients_mutex.lock(); } void unlock() { m_clients_mutex.unlock(); } - std::map& getClientList() - { return m_clients; } + UNORDERED_MAP& getClientList() { return m_clients; } private: /* update internal player list */ @@ -513,7 +512,7 @@ private: con::Connection* m_con; Mutex m_clients_mutex; // Connected clients (behind the con mutex) - std::map m_clients; + UNORDERED_MAP m_clients; std::vector m_clients_names; //for announcing masterserver // Environment -- cgit v1.2.3