summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorAdam <Adam@anope.org>2011-03-14 20:16:38 -0400
committerAdam <Adam@anope.org>2011-03-14 20:16:38 -0400
commitddfb16de1a61a9b80ece0ba6e5fd34326abf5f18 (patch)
tree81e29e3eebc8ae6241e6bdd6970e48a037291203 /include
parent2555d0d6373e631ca2504826a02aaae2e82cd7a4 (diff)
Fixed compile
Diffstat (limited to 'include')
-rw-r--r--include/anope.h3
-rw-r--r--include/bots.h4
-rw-r--r--include/hashcomp.h23
-rw-r--r--include/services.h3
-rw-r--r--include/users.h4
5 files changed, 8 insertions, 29 deletions
diff --git a/include/anope.h b/include/anope.h
index 1a8612241..07cd97da5 100644
--- a/include/anope.h
+++ b/include/anope.h
@@ -20,6 +20,9 @@ class Message;
namespace Anope
{
+ template<typename T> class map : public std::map<string, T> { };
+ template<typename T> class insensitive_map : public std::map<string, T, std::less<ci::string> > { };
+
/**
* A wrapper string class around all the other string classes, this class will
* allow us to only require one type of string everywhere that can be converted
diff --git a/include/bots.h b/include/bots.h
index 4253802ff..bcbbc83d7 100644
--- a/include/bots.h
+++ b/include/bots.h
@@ -12,8 +12,8 @@
class BotInfo;
-extern CoreExport patricia_tree<BotInfo *, ci::ci_char_traits> BotListByNick;
-extern CoreExport patricia_tree<BotInfo *> BotListByUID;
+extern CoreExport Anope::insensitive_map<BotInfo *> BotListByNick;
+extern CoreExport Anope::map<BotInfo *> BotListByUID;
/** Flags settable on a bot
*/
diff --git a/include/hashcomp.h b/include/hashcomp.h
index 6e237f7a2..9c1f0d2dc 100644
--- a/include/hashcomp.h
+++ b/include/hashcomp.h
@@ -162,12 +162,6 @@ namespace irc
* @return Pointer to the first occurance of c in s1
*/
static const char *find(const char *s1, int n, char c);
-
- /** Convert a char to lowercase
- * @param c1 The character to convert
- * @return The lowercase version of the char
- */
- static const char chartolower(char c1);
};
/** This typedef declares irc::string based upon irc_char_traits.
@@ -239,12 +233,6 @@ namespace ci
* @return Pointer to the first occurance of c in s1
*/
static const char *find(const char *s1, int n, char c);
-
- /** Convert a char to lowercase
- * @param c1 The character to convert
- * @return The lowercase version of the char
- */
- static const char chartolower(char c1);
};
/** This typedef declares ci::string based upon ci_char_traits.
@@ -271,17 +259,6 @@ namespace ci
namespace std
{
- /** The std_char_traits class is used for normal comparison of strings.
- */
- struct CoreExport std_char_traits : char_traits<char>
- {
- /** Convert a char to lowercase
- * @param c1 The character to convert
- * @return The lowercase version of the char
- */
- static const char chartolower(char c1);
- };
-
/** An overload for std::equal_to<ci::string> that uses Anope::string, passed for the fourth temmplate
* argument for unordered_map
*/
diff --git a/include/services.h b/include/services.h
index 75e21a5cf..15896ca83 100644
--- a/include/services.h
+++ b/include/services.h
@@ -202,7 +202,6 @@ extern "C" void __pfnBkCheck() {}
#include <set>
#include "anope.h"
-#include "patricia.h"
/** This class can be used on its own to represent an exception, or derived to represent a module-specific exception.
* When a module whishes to abort, e.g. within a constructor, it should throw an exception using ModuleException or
@@ -897,7 +896,7 @@ struct Exception
/*************************************************************************/
-extern CoreExport patricia_tree<Session *> SessionList;
+extern CoreExport Anope::map<Session *> SessionList;
struct Session
{
diff --git a/include/users.h b/include/users.h
index 9f6e250e5..dcfe219bf 100644
--- a/include/users.h
+++ b/include/users.h
@@ -8,8 +8,8 @@
#ifndef USERS_H
#define USERS_H
-extern CoreExport patricia_tree<User *, ci::ci_char_traits> UserListByNick;
-extern CoreExport patricia_tree<User *> UserListByUID;
+extern CoreExport Anope::insensitive_map<User *> UserListByNick;
+extern CoreExport Anope::map<User *> UserListByUID;
class CoreExport ChannelStatus : public Flags<ChannelModeName, CMODE_END * 2>
{