From 39d288f99f878fcaa0f43d659815686fbee667f5 Mon Sep 17 00:00:00 2001 From: Sadie Powell Date: Sat, 9 Mar 2024 13:22:48 +0000 Subject: [PATCH] Rename hash_map to unordered_map to match the underlying container. --- include/account.h | 4 ++-- include/anope.h | 2 +- include/channels.h | 2 +- include/regchannel.h | 2 +- include/users.h | 2 +- modules/chanserv/cs_seen.cpp | 2 +- modules/nickserv/ns_cert.cpp | 4 ++-- modules/webcpanel/pages/index.cpp | 2 +- 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_map; -typedef Anope::hash_map nickcore_map; +typedef Anope::unordered_map nickalias_map; +typedef Anope::unordered_map nickcore_map; typedef std::unordered_map nickcoreid_map; extern CoreExport Serialize::Checker 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; template - using hash_map = std::unordered_map; + using unordered_map = std::unordered_map; #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_map; +typedef Anope::unordered_map 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 registered_channel_map; +typedef Anope::unordered_map registered_channel_map; extern CoreExport Serialize::Checker 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_map; +typedef Anope::unordered_map 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 database_map; +typedef Anope::unordered_map 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 certmap; +static Anope::unordered_map certmap; struct CertServiceImpl final : CertService @@ -21,7 +21,7 @@ struct CertServiceImpl final NickCore *FindAccountFromCert(const Anope::string &cert) override { - Anope::hash_map::iterator it = certmap.find(cert); + Anope::unordered_map::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::iterator it = last_login_attempt.find(ip); + Anope::unordered_map::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 last_login_attempt; + Anope::unordered_map last_login_attempt; time_t last_clear = 0; public: