Cosmetics: address cppcheck warnings

This commit is contained in:
Felipe Zimmerle
2020-01-27 18:11:08 -03:00
parent 68ef2dece3
commit fe98ce4c7d
53 changed files with 358 additions and 279 deletions

View File

@@ -52,33 +52,34 @@ using actions::transformations::None;
Rule::Rule(const std::string &marker)
: m_accuracy(0),
: m_theDisruptiveAction(nullptr),
m_logData(nullptr),
m_msg(nullptr),
m_severity(nullptr),
m_chained(false),
m_containsCaptureAction(false),
m_containsMultiMatchAction(false),
m_containsStaticBlockAction(false),
m_secMarker(true),
m_ruleId(0),
m_accuracy(0),
m_lineNumber(0),
m_maturity(0),
m_phase(-1),
m_variables(NULL),
m_op(NULL),
m_chainedRuleChild(NULL),
m_chainedRuleParent(NULL),
m_fileName(""),
m_marker(marker),
m_rev(""),
m_ver(""),
m_actionsRuntimePos(),
m_actionsRuntimePre(),
m_actionsSetVar(),
m_actionsTag(),
m_chained(false),
m_chainedRuleChild(NULL),
m_fileName(""),
m_lineNumber(0),
m_marker(marker),
m_maturity(0),
m_op(NULL),
m_phase(-1),
m_rev(""),
m_ruleId(0),
m_secMarker(true),
m_variables(NULL),
m_ver(""),
m_unconditional(false),
m_referenceCount(1),
m_theDisruptiveAction(nullptr),
m_containsStaticBlockAction(false),
m_containsCaptureAction(false),
m_containsMultiMatchAction(false),
m_severity(nullptr),
m_logData(nullptr),
m_msg(nullptr) { }
m_referenceCount(1) { }
Rule::Rule(Operator *_op,
@@ -86,34 +87,35 @@ Rule::Rule(Operator *_op,
std::vector<Action *> *actions,
std::string fileName,
int lineNumber)
: m_accuracy(0),
: m_theDisruptiveAction(nullptr),
m_logData(nullptr),
m_msg(nullptr),
m_severity(nullptr),
m_chained(false),
m_containsCaptureAction(false),
m_containsMultiMatchAction(false),
m_containsStaticBlockAction(false),
m_secMarker(false),
m_ruleId(0),
m_accuracy(0),
m_lineNumber(lineNumber),
m_maturity(0),
m_phase(-1),
m_variables(_variables),
m_op(_op),
m_chainedRuleChild(NULL),
m_chainedRuleParent(NULL),
m_fileName(fileName),
m_marker(""),
m_rev(""),
m_ver(""),
m_actionsRuntimePos(),
m_actionsRuntimePre(),
m_actionsSetVar(),
m_actionsTag(),
m_chained(false),
m_chainedRuleChild(NULL),
m_chainedRuleParent(NULL),
m_fileName(fileName),
m_lineNumber(lineNumber),
m_marker(""),
m_maturity(0),
m_op(_op),
m_phase(-1),
m_rev(""),
m_ruleId(0),
m_secMarker(false),
m_variables(_variables),
m_ver(""),
m_unconditional(false),
m_referenceCount(1),
m_theDisruptiveAction(nullptr),
m_containsStaticBlockAction(false),
m_containsCaptureAction(false),
m_containsMultiMatchAction(false),
m_severity(nullptr),
m_logData(nullptr),
m_msg(nullptr) {
m_referenceCount(1)
{
/* */
organizeActions(actions);
@@ -338,7 +340,7 @@ inline void Rule::executeTransformation(actions::Action *a,
std::list<std::pair<std::shared_ptr<std::string>,
std::shared_ptr<std::string>>> *ret,
std::string *path,
int *nth) {
int *nth) const {
std::string *oldValue = (*value).get();
std::string newValue = a->evaluate(*oldValue, trans);