Refactoring on the operators: negation is now being handled globally

Other minors changes were also made, including adding the prefix `m_'
to all the members of the class.
This commit is contained in:
Felipe Zimmerle
2016-10-19 10:23:03 -03:00
parent 28a44b966a
commit 8757840bc3
36 changed files with 88 additions and 138 deletions

View File

@@ -27,7 +27,7 @@ namespace operators {
bool BeginsWith::evaluate(Transaction *transaction, const std::string &str) {
bool ret = false;
std::string p = MacroExpansion::expand(param, transaction);
std::string p = MacroExpansion::expand(m_param, transaction);
if (str.size() < p.size()) {
ret = false;
@@ -35,10 +35,6 @@ bool BeginsWith::evaluate(Transaction *transaction, const std::string &str) {
ret = true;
}
if (negation) {
return !ret;
}
return ret;
}