From 9184ba2bec9ac30c5d25f65393930f52dd60e42c Mon Sep 17 00:00:00 2001 From: Cristian-Adrian Frasineanu Date: Fri, 25 Nov 2016 15:21:29 +0200 Subject: [PATCH] Typos --- app/Bootstrap.cpp | 1 + app/Helpers.h | 2 +- app/RepositoryInterface.h | 2 +- app/UserRepository.cpp | 8 ++++---- 4 files changed, 7 insertions(+), 6 deletions(-) diff --git a/app/Bootstrap.cpp b/app/Bootstrap.cpp index cc7a9d0..cb5fa2a 100644 --- a/app/Bootstrap.cpp +++ b/app/Bootstrap.cpp @@ -1,4 +1,5 @@ #include "Console.h" +#include using namespace std; diff --git a/app/Helpers.h b/app/Helpers.h index d3a074e..9ec75ec 100644 --- a/app/Helpers.h +++ b/app/Helpers.h @@ -73,5 +73,5 @@ inline void printVector(vector &v, string &message) } void toLowerCase(string &); -void sleepAndClearBuffer(unsigned delay); +void sleepAndClearBuffer(unsigned); void clearScreen(); \ No newline at end of file diff --git a/app/RepositoryInterface.h b/app/RepositoryInterface.h index b5b7f1b..a7bc870 100644 --- a/app/RepositoryInterface.h +++ b/app/RepositoryInterface.h @@ -22,7 +22,7 @@ class RepositoryInterface { ModelInterface *model; - vector errorsBag; + vector errorBag; public: virtual void validateItems(map &) = 0; virtual void retrieveItemForActive() = 0; diff --git a/app/UserRepository.cpp b/app/UserRepository.cpp index d3736a6..c4869f6 100644 --- a/app/UserRepository.cpp +++ b/app/UserRepository.cpp @@ -20,7 +20,7 @@ void UserRepository::defineValidation() { "password", "Password should be 5-16 characters long, and contain at least an uppercase letter, a number and a special character." }, }; - this->errorsBag = {}; + this->errorBag = {}; } UserRepository::UserRepository() @@ -48,7 +48,7 @@ void UserRepository::validateItems(map &truncatedInput) { if (!regex_match(it->second.c_str(), regex(this->ValidationRules[it->first.c_str()]))) { - this->errorsBag.push_back(this->ValidationErrors[it->first.c_str()]); + this->errorBag.push_back(this->ValidationErrors[it->first.c_str()]); } } catch (const regex_error &e) @@ -62,13 +62,13 @@ void UserRepository::validateItems(map &truncatedInput) } // If there are no errors, send it along. - if (this->errorsBag.empty()) + if (this->errorBag.empty()) { this->receiveCleanInput(truncatedInput); } // Let the console know about the errors. - Controller::setErrorsBag(this->errorsBag); + Controller::setErrorsBag(this->errorBag); } void UserRepository::retrieveItemForActive()