1
0
mirror of https://github.com/anope/anope.git synced 2026-06-25 17:26:37 +02:00

Use std::tr1::unordered_map for a few of the larger maps

This commit is contained in:
Adam
2012-11-05 22:17:47 -05:00
parent 27ab6a686c
commit 53b2bdfe5e
41 changed files with 182 additions and 65 deletions
+3 -4
View File
@@ -22,8 +22,7 @@
#include "opertype.h"
#include "extern.h"
Anope::insensitive_map<User *> UserListByNick;
Anope::map<User *> UserListByUID;
user_map UserListByNick, UserListByUID;
int32_t opcnt = 0;
uint32_t usercnt = 0, maxusercnt = 0;
@@ -856,13 +855,13 @@ User *finduser(const Anope::string &nick)
{
if (isdigit(nick[0]) && ircdproto->RequiresID)
{
Anope::map<User *>::iterator it = UserListByUID.find(nick);
user_map::iterator it = UserListByUID.find(nick);
if (it != UserListByUID.end())
return it->second;
}
else
{
Anope::insensitive_map<User *>::iterator it = UserListByNick.find(nick);
user_map::iterator it = UserListByNick.find(nick);
if (it != UserListByNick.end())
return it->second;
}