diff options
author | Sadie Powell <sadie@witchery.services> | 2024-03-09 13:22:48 +0000 |
---|---|---|
committer | Sadie Powell <sadie@witchery.services> | 2024-03-09 22:22:56 +0000 |
commit | 39d288f99f878fcaa0f43d659815686fbee667f5 (patch) | |
tree | d2af6fa9ef42d9887965886acdba9fd13a7e074a | |
parent | 9ead3f15c3256786d3c2b485a786ad32faa0a438 (diff) |
Rename hash_map to unordered_map to match the underlying container.
-rw-r--r-- | include/account.h | 4 | ||||
-rw-r--r-- | include/anope.h | 2 | ||||
-rw-r--r-- | include/channels.h | 2 | ||||
-rw-r--r-- | include/regchannel.h | 2 | ||||
-rw-r--r-- | include/users.h | 2 | ||||
-rw-r--r-- | modules/chanserv/cs_seen.cpp | 2 | ||||
-rw-r--r-- | modules/nickserv/ns_cert.cpp | 4 | ||||
-rw-r--r-- | modules/webcpanel/pages/index.cpp | 2 | ||||
-rw-r--r-- | modules/webcpanel/pages/index.h | 2 |
9 files changed, 11 insertions, 11 deletions
diff --git a/include/account.h b/include/account.h index 9a59cb913..714369152 100644 --- a/include/account.h +++ b/include/account.h @@ -17,8 +17,8 @@ #include "memo.h" #include "base.h" -typedef Anope::hash_map<NickAlias *> nickalias_map; -typedef Anope::hash_map<NickCore *> nickcore_map; +typedef Anope::unordered_map<NickAlias *> nickalias_map; +typedef Anope::unordered_map<NickCore *> nickcore_map; typedef std::unordered_map<uint64_t, NickCore *> nickcoreid_map; extern CoreExport Serialize::Checker<nickalias_map> NickAliasList; diff --git a/include/anope.h b/include/anope.h index 000e74d1a..fd3728d84 100644 --- a/include/anope.h +++ b/include/anope.h @@ -343,7 +343,7 @@ namespace Anope using multimap = std::multimap<string, T, ci::less>; template<typename T> - using hash_map = std::unordered_map<string, T, hash_ci, compare>; + using unordered_map = std::unordered_map<string, T, hash_ci, compare>; #ifndef REPRODUCIBLE_BUILD static const char *const compiled = __TIME__ " " __DATE__; diff --git a/include/channels.h b/include/channels.h index 4fecd9fc8..adecb4701 100644 --- a/include/channels.h +++ b/include/channels.h @@ -13,7 +13,7 @@ #include "modes.h" #include "serialize.h" -typedef Anope::hash_map<Channel *> channel_map; +typedef Anope::unordered_map<Channel *> channel_map; extern CoreExport channel_map ChannelList; diff --git a/include/regchannel.h b/include/regchannel.h index 4276333d5..6529124d1 100644 --- a/include/regchannel.h +++ b/include/regchannel.h @@ -16,7 +16,7 @@ #include "serialize.h" #include "bots.h" -typedef Anope::hash_map<ChannelInfo *> registered_channel_map; +typedef Anope::unordered_map<ChannelInfo *> registered_channel_map; extern CoreExport Serialize::Checker<registered_channel_map> RegisteredChannelList; diff --git a/include/users.h b/include/users.h index e84d5336f..85435dd0f 100644 --- a/include/users.h +++ b/include/users.h @@ -19,7 +19,7 @@ #include "account.h" #include "sockets.h" -typedef Anope::hash_map<User *> user_map; +typedef Anope::unordered_map<User *> user_map; extern CoreExport user_map UserListByNick, UserListByUID; diff --git a/modules/chanserv/cs_seen.cpp b/modules/chanserv/cs_seen.cpp index e18434d3e..183cd5e05 100644 --- a/modules/chanserv/cs_seen.cpp +++ b/modules/chanserv/cs_seen.cpp @@ -19,7 +19,7 @@ enum TypeInfo static bool simple; struct SeenInfo; static SeenInfo *FindInfo(const Anope::string &nick); -typedef Anope::hash_map<SeenInfo *> database_map; +typedef Anope::unordered_map<SeenInfo *> database_map; database_map database; struct SeenInfo final diff --git a/modules/nickserv/ns_cert.cpp b/modules/nickserv/ns_cert.cpp index 0eeb5f68b..1c9d0ae80 100644 --- a/modules/nickserv/ns_cert.cpp +++ b/modules/nickserv/ns_cert.cpp @@ -12,7 +12,7 @@ #include "module.h" #include "modules/ns_cert.h" -static Anope::hash_map<NickCore *> certmap; +static Anope::unordered_map<NickCore *> certmap; struct CertServiceImpl final : CertService @@ -21,7 +21,7 @@ struct CertServiceImpl final NickCore *FindAccountFromCert(const Anope::string &cert) override { - Anope::hash_map<NickCore *>::iterator it = certmap.find(cert); + Anope::unordered_map<NickCore *>::iterator it = certmap.find(cert); if (it != certmap.end()) return it->second; return NULL; diff --git a/modules/webcpanel/pages/index.cpp b/modules/webcpanel/pages/index.cpp index 204e00db1..831eb9996 100644 --- a/modules/webcpanel/pages/index.cpp +++ b/modules/webcpanel/pages/index.cpp @@ -103,7 +103,7 @@ bool WebCPanel::Index::OnRequest(HTTPProvider *server, const Anope::string &page // Rate limit check. Anope::string ip = client->clientaddr.addr(); - Anope::hash_map<time_t>::iterator it = last_login_attempt.find(ip); + Anope::unordered_map<time_t>::iterator it = last_login_attempt.find(ip); if (it != last_login_attempt.end()) { time_t last_time = it->second; diff --git a/modules/webcpanel/pages/index.h b/modules/webcpanel/pages/index.h index 1032b732f..e94c2061d 100644 --- a/modules/webcpanel/pages/index.h +++ b/modules/webcpanel/pages/index.h @@ -17,7 +17,7 @@ class Index final { static const int FLUSH_TIME = 60; - Anope::hash_map<time_t> last_login_attempt; + Anope::unordered_map<time_t> last_login_attempt; time_t last_clear = 0; public: |