diff options
-rw-r--r-- | include/command_parse.h | 4 | ||||
-rw-r--r-- | include/typedefs.h | 4 | ||||
-rw-r--r-- | src/command_parse.cpp | 6 |
3 files changed, 5 insertions, 9 deletions
diff --git a/include/command_parse.h b/include/command_parse.h index 2abbdb607..0f39d3586 100644 --- a/include/command_parse.h +++ b/include/command_parse.h @@ -30,7 +30,7 @@ class CoreExport CommandParser { public: - typedef Commandtable CommandMap; + typedef TR1NS::unordered_map<std::string, Command*> CommandMap; private: /** Process a command from a user. @@ -41,7 +41,7 @@ class CoreExport CommandParser /** Command list, a hash_map of command names to Command* */ - Commandtable cmdlist; + CommandMap cmdlist; public: /** Default constructor. diff --git a/include/typedefs.h b/include/typedefs.h index 336084c55..c883a0859 100644 --- a/include/typedefs.h +++ b/include/typedefs.h @@ -100,10 +100,6 @@ typedef std::map<std::string, reference<OperInfo> > OperIndex; /** Files read by the configuration */ typedef std::map<std::string, file_cache> ConfigFileCache; -/** A hash of commands used by the core - */ -typedef TR1NS::unordered_map<std::string, Command*> Commandtable; - /** Membership list of a channel */ typedef std::map<User*, Membership*> UserMembList; /** Iterator of UserMembList */ diff --git a/src/command_parse.cpp b/src/command_parse.cpp index 0669c89ad..82bfe0962 100644 --- a/src/command_parse.cpp +++ b/src/command_parse.cpp @@ -109,7 +109,7 @@ bool CommandParser::LoopCall(User* user, Command* handler, const std::vector<std Command* CommandParser::GetHandler(const std::string &commandname) { - Commandtable::iterator n = cmdlist.find(commandname); + CommandMap::iterator n = cmdlist.find(commandname); if (n != cmdlist.end()) return n->second; @@ -120,7 +120,7 @@ Command* CommandParser::GetHandler(const std::string &commandname) CmdResult CommandParser::CallHandler(const std::string& commandname, const std::vector<std::string>& parameters, User* user, Command** cmd) { - Commandtable::iterator n = cmdlist.find(commandname); + CommandMap::iterator n = cmdlist.find(commandname); if (n != cmdlist.end()) { @@ -322,7 +322,7 @@ void CommandParser::ProcessCommand(LocalUser *user, std::string &cmd) void CommandParser::RemoveCommand(Command* x) { - Commandtable::iterator n = cmdlist.find(x->name); + CommandMap::iterator n = cmdlist.find(x->name); if (n != cmdlist.end() && n->second == x) cmdlist.erase(n); } |