Optimizations.
This commit is contained in:
1 parent
7e43656c5c
commit
96d9295df8
7 files changed
+34
-30
No files matched your search
+2
-2
@@ -3,7 +3,7 @@
|
||||
|
||||
namespace core {
|
||||
|
||||
CommandList::CommandList(std::string delimiter) : delimiter(delimiter) {}
|
||||
CommandList::CommandList(std::string delimiter, int depth) : delimiter(delimiter), depth(depth) {}
|
||||
|
||||
void CommandList::add(Command &command, std::string name) {
|
||||
commands.insert(std::make_pair(name, &command));
|
||||
@@ -18,7 +18,7 @@ namespace core {
|
||||
if(request.equals(""))
|
||||
return false;
|
||||
request.split(delimiter);
|
||||
auto command = commands.find(request[0].str())->second;
|
||||
auto command = commands[request[0].str()];
|
||||
return command->processCommand(request, session);
|
||||
}
|
||||
return false;
|
||||
|
||||
Reference in new issue
Block a user