@@ -67,16 +67,22 @@ void AnchoredSetVariable::set(const std::string &key,
6767
6868
6969void AnchoredSetVariable::resolve (
70- std::vector<const VariableValue *> *l) {
70+ std::vector<const VariableValue *> *l) const {
7171 for (const auto & x : *this ) {
7272 l->insert (l->begin (), new VariableValue (x.second ));
7373 }
7474}
7575
7676
77+ void AnchoredSetVariable::resolve (
78+ std::vector<const VariableValue *> *l) {
79+ static_cast <const AnchoredSetVariable&>(*this ).resolve (l);
80+ }
81+
82+
7783void AnchoredSetVariable::resolve (
7884 std::vector<const VariableValue *> *l,
79- variables::KeyExclusions &ke) {
85+ const variables::KeyExclusions &ke) const {
8086 for (const auto & x : *this ) {
8187 if (!ke.toOmit (x.first )) {
8288 l->insert (l->begin (), new VariableValue (x.second ));
@@ -88,6 +94,13 @@ void AnchoredSetVariable::resolve(
8894}
8995
9096
97+ void AnchoredSetVariable::resolve (
98+ std::vector<const VariableValue *> *l,
99+ variables::KeyExclusions &ke) { // cppcheck-suppress constParameterReference
100+ static_cast <const AnchoredSetVariable&>(*this ).resolve (l, ke);
101+ }
102+
103+
91104void AnchoredSetVariable::resolve (const std::string &key,
92105 std::vector<const VariableValue *> *l) {
93106 auto range = this ->equal_range (key);
@@ -109,7 +122,7 @@ std::unique_ptr<std::string> AnchoredSetVariable::resolveFirst(
109122
110123
111124void AnchoredSetVariable::resolveRegularExpression (Utils::Regex *r,
112- std::vector<const VariableValue *> *l) {
125+ std::vector<const VariableValue *> *l) const {
113126 for (const auto & x : *this ) {
114127 int ret = Utils::regex_search (x.first , *r);
115128 if (ret <= 0 ) {
@@ -120,9 +133,15 @@ void AnchoredSetVariable::resolveRegularExpression(Utils::Regex *r,
120133}
121134
122135
136+ void AnchoredSetVariable::resolveRegularExpression (Utils::Regex *r,
137+ std::vector<const VariableValue *> *l) {
138+ static_cast <const AnchoredSetVariable&>(*this ).resolveRegularExpression (r, l);
139+ }
140+
141+
123142void AnchoredSetVariable::resolveRegularExpression (Utils::Regex *r,
124143 std::vector<const VariableValue *> *l,
125- variables::KeyExclusions &ke) {
144+ const variables::KeyExclusions &ke) const {
126145 for (const auto & x : *this ) {
127146 int ret = Utils::regex_search (x.first , *r);
128147 if (ret <= 0 ) {
@@ -138,4 +157,11 @@ void AnchoredSetVariable::resolveRegularExpression(Utils::Regex *r,
138157}
139158
140159
160+ void AnchoredSetVariable::resolveRegularExpression (Utils::Regex *r,
161+ std::vector<const VariableValue *> *l,
162+ variables::KeyExclusions &ke) { // cppcheck-suppress constParameterReference
163+ static_cast <const AnchoredSetVariable&>(*this ).resolveRegularExpression (r, l, ke);
164+ }
165+
166+
141167} // namespace modsecurity
0 commit comments