1
0
mirror of https://github.com/anope/anope.git synced 2026-07-01 14:46:39 +02:00

Remove TR1 compatibility layer.

This isn't necessary now we use C++17.
This commit is contained in:
Sadie Powell
2022-03-01 05:09:29 +00:00
parent a8724b5f03
commit 09c587bed0
5 changed files with 6 additions and 13 deletions
+1 -1
View File
@@ -19,7 +19,7 @@
typedef Anope::hash_map<NickAlias *> nickalias_map;
typedef Anope::hash_map<NickCore *> nickcore_map;
typedef TR1NS::unordered_map<uint64_t, NickCore *> nickcoreid_map;
typedef std::unordered_map<uint64_t, NickCore *> nickcoreid_map;
extern CoreExport Serialize::Checker<nickalias_map> NickAliasList;
extern CoreExport Serialize::Checker<nickcore_map> NickCoreList;
+3 -3
View File
@@ -312,7 +312,7 @@ namespace Anope
{
inline size_t operator()(const string &s) const
{
return TR1NS::hash<std::string>()(s.lower().str());
return std::hash<std::string>()(s.lower().str());
}
};
@@ -320,7 +320,7 @@ namespace Anope
{
inline size_t operator()(const string &s) const
{
return TR1NS::hash<std::string>()(s.str());
return std::hash<std::string>()(s.str());
}
};
@@ -334,7 +334,7 @@ namespace Anope
template<typename T> class map : public std::map<string, T, ci::less> { };
template<typename T> class multimap : public std::multimap<string, T, ci::less> { };
template<typename T> class hash_map : public TR1NS::unordered_map<string, T, hash_ci, compare> { };
template<typename T> class hash_map : public std::unordered_map<string, T, hash_ci, compare> { };
#ifndef REPRODUCIBLE_BUILD
static const char *const compiled = __TIME__ " " __DATE__;
-7
View File
@@ -10,14 +10,7 @@
#include <string>
#include <locale>
#if defined _LIBCPP_VERSION || defined _WIN32
#include <unordered_map>
#define TR1NS std
#else
#include <tr1/unordered_map>
#define TR1NS std::tr1
#endif
#include "services.h"
+1 -1
View File
@@ -34,7 +34,7 @@ struct Exception : Serializable
class SessionService : public Service
{
public:
typedef TR1NS::unordered_map<cidr, Session *, cidr::hash> SessionMap;
typedef std::unordered_map<cidr, Session *, cidr::hash> SessionMap;
typedef std::vector<Exception *> ExceptionVector;
SessionService(Module *m) : Service(m, "SessionService", "session") { }
+1 -1
View File
@@ -649,7 +649,7 @@ class MyManager : public Manager, public Timer
{
uint32_t serial;
typedef TR1NS::unordered_map<Question, Query, Question::hash> cache_map;
typedef std::unordered_map<Question, Query, Question::hash> cache_map;
cache_map cache;
TCPSocket *tcpsock = nullptr;