Refactoring: Splits Rule into Rule and RuleWithActions

This commit is contained in:
Felipe Zimmerle
2019-02-19 10:15:01 -03:00
parent 43f8aee6b6
commit 8eb7b8fe6c
93 changed files with 360 additions and 382 deletions

View File

@@ -40,7 +40,7 @@ bool SetVar::init(std::string *error) {
}
bool SetVar::evaluate(Rule *rule, Transaction *t) {
bool SetVar::evaluate(RuleWithActions *rule, Transaction *t) {
std::string targetValue;
std::string resolvedPre;
@@ -112,7 +112,8 @@ bool SetVar::evaluate(Rule *rule, Transaction *t) {
try {
std::vector<const VariableValue *> l;
m_variable->evaluate(t, rule, &l);
Rule *rr = dynamic_cast<Rule *>(rule);
m_variable->evaluate(t, rr, &l);
if (l.size() == 0) {
value = 0;
} else {