From 09c587bed0589bc3678e4fd4b52101cbb28501b1 Mon Sep 17 00:00:00 2001 From: Sadie Powell Date: Tue, 1 Mar 2022 05:09:29 +0000 Subject: [PATCH] Remove TR1 compatibility layer. This isn't necessary now we use C++17. --- include/account.h | 2 +- include/anope.h | 6 +++--- include/hashcomp.h | 7 ------- include/modules/os_session.h | 2 +- modules/m_dns.cpp | 2 +- 5 files changed, 6 insertions(+), 13 deletions(-) diff --git a/include/account.h b/include/account.h index a26f1e184..eb1b6a81f 100644 --- a/include/account.h +++ b/include/account.h @@ -19,7 +19,7 @@ typedef Anope::hash_map nickalias_map; typedef Anope::hash_map nickcore_map; -typedef TR1NS::unordered_map nickcoreid_map; +typedef std::unordered_map nickcoreid_map; extern CoreExport Serialize::Checker NickAliasList; extern CoreExport Serialize::Checker NickCoreList; diff --git a/include/anope.h b/include/anope.h index 17677bf73..59f7c1684 100644 --- a/include/anope.h +++ b/include/anope.h @@ -312,7 +312,7 @@ namespace Anope { inline size_t operator()(const string &s) const { - return TR1NS::hash()(s.lower().str()); + return std::hash()(s.lower().str()); } }; @@ -320,7 +320,7 @@ namespace Anope { inline size_t operator()(const string &s) const { - return TR1NS::hash()(s.str()); + return std::hash()(s.str()); } }; @@ -334,7 +334,7 @@ namespace Anope template class map : public std::map { }; template class multimap : public std::multimap { }; - template class hash_map : public TR1NS::unordered_map { }; + template class hash_map : public std::unordered_map { }; #ifndef REPRODUCIBLE_BUILD static const char *const compiled = __TIME__ " " __DATE__; diff --git a/include/hashcomp.h b/include/hashcomp.h index 0d04a6144..4a29fb859 100644 --- a/include/hashcomp.h +++ b/include/hashcomp.h @@ -10,14 +10,7 @@ #include #include - -#if defined _LIBCPP_VERSION || defined _WIN32 #include -#define TR1NS std -#else -#include -#define TR1NS std::tr1 -#endif #include "services.h" diff --git a/include/modules/os_session.h b/include/modules/os_session.h index 42456e4af..7456ebc3a 100644 --- a/include/modules/os_session.h +++ b/include/modules/os_session.h @@ -34,7 +34,7 @@ struct Exception : Serializable class SessionService : public Service { public: - typedef TR1NS::unordered_map SessionMap; + typedef std::unordered_map SessionMap; typedef std::vector ExceptionVector; SessionService(Module *m) : Service(m, "SessionService", "session") { } diff --git a/modules/m_dns.cpp b/modules/m_dns.cpp index 3bbb4cfc8..45e2a1530 100644 --- a/modules/m_dns.cpp +++ b/modules/m_dns.cpp @@ -649,7 +649,7 @@ class MyManager : public Manager, public Timer { uint32_t serial; - typedef TR1NS::unordered_map cache_map; + typedef std::unordered_map cache_map; cache_map cache; TCPSocket *tcpsock = nullptr;