Optimizations.

This commit is contained in:
Brad Arant committed 2021-09-23 16:28:32 -07:00
1 parent 7e43656c5c
commit 96d9295df8
7 files changed
+34 -30

No files matched your search

+2 -2
View File
@@ -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;