Delays variable name resolution to whenever it is necessary

This commit is contained in:
Felipe Zimmerle
2020-08-25 09:14:40 -03:00
committed by Felipe Zimmerle
parent 64bffdebc4
commit 9f0e345f43
5 changed files with 55 additions and 12 deletions

View File

@@ -83,10 +83,12 @@ bool Operator::evaluateInternal(Transaction *transaction,
std::string Operator::resolveMatchMessage(Transaction *t,
std::string key, std::string value) {
const VariableValue *v) {
std::string ret = m_match_message;
if (ret.empty() == true) {
const std::string &key = v->getKeyWithCollection();
const std::string &value = v->getValue();
if (m_couldContainsMacro == false) {
ret = "Matched \"Operator `" + m_op + "' with parameter `" +
utils::string::limitTo(200, m_param) +

View File

@@ -128,7 +128,7 @@ class Operator {
}
virtual std::string resolveMatchMessage(Transaction *t,
std::string key, std::string value);
const VariableValue *v);
std::string m_match_message;