From 1cdf4a5ca148449c421c005bdd962756b6b8a12c Mon Sep 17 00:00:00 2001 From: Sadie Powell Date: Fri, 7 Oct 2022 20:03:05 +0100 Subject: Rename user_hash to UserMap and move to usermanager. --- include/channelmanager.h | 1 + include/typedefs.h | 2 -- include/usermanager.h | 9 ++++++--- 3 files changed, 7 insertions(+), 5 deletions(-) (limited to 'include') diff --git a/include/channelmanager.h b/include/channelmanager.h index 48d395770..69acf5a7a 100644 --- a/include/channelmanager.h +++ b/include/channelmanager.h @@ -19,6 +19,7 @@ #pragma once +/** A mapping of channel names to their Channel object. */ typedef std::unordered_map ChannelMap; /** Manages state relating to channels. */ diff --git a/include/typedefs.h b/include/typedefs.h index 80fc43c7d..c98b39897 100644 --- a/include/typedefs.h +++ b/include/typedefs.h @@ -83,8 +83,6 @@ namespace ClientProtocol #include "hashcomp.h" #include "base.h" -typedef std::unordered_map user_hash; - /** List of channels to consider when building the neighbor list of a user */ typedef std::vector IncludeChanList; diff --git a/include/usermanager.h b/include/usermanager.h index e603ee495..17ebf0def 100644 --- a/include/usermanager.h +++ b/include/usermanager.h @@ -28,6 +28,9 @@ #include +/** A mapping of user nicks or uuids to their User object. */ +typedef std::unordered_map UserMap; + class CoreExport UserManager final { public: @@ -81,11 +84,11 @@ public: /** Nickname string -> User* map. Contains all users, including unregistered ones. */ - user_hash clientlist; + UserMap clientlist; /** UUID -> User* map. Contains all users, including unregistered ones. */ - user_hash uuidlist; + UserMap uuidlist; /** Oper list, a vector containing all local and remote opered users */ @@ -177,7 +180,7 @@ public: /** Get a hash map containing all users, keyed by their nickname * @return A hash map mapping nicknames to User pointers */ - user_hash& GetUsers() { return clientlist; } + UserMap& GetUsers() { return clientlist; } /** Get a list containing all local users * @return A const list of local users -- cgit v1.3.1-10-gc9f91