From 8d6f414086ae1ec1324252535a1aca4e963d4dc5 Mon Sep 17 00:00:00 2001 From: Brad Arant Date: Sat, 16 Feb 2019 22:58:53 -0800 Subject: [PATCH] Cleaned up cmmandlist. --- CommandList.cpp | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/CommandList.cpp b/CommandList.cpp index 5da5c64..b97386e 100644 --- a/CommandList.cpp +++ b/CommandList.cpp @@ -16,15 +16,13 @@ namespace core { } bool CommandList::processRequest(std::string request, Session *session) { - bool found = false; for(auto *command : commands) { if(command->check(request)) { command->processCommand(request, session); - found = true; - break; + return true; } } - return found; + return false; } int CommandList::processCommand(std::string request, Session *session) {