mirror of
https://github.com/owasp-modsecurity/ModSecurity.git
synced 2025-11-18 02:10:36 +03:00
Cosmetics: Using VariableValues instead of std::vector<...>
Making the code more readable.
This commit is contained in:
@@ -86,7 +86,7 @@ void InMemoryPerProcess::del(const std::string& key) {
|
||||
|
||||
|
||||
void InMemoryPerProcess::resolveSingleMatch(const std::string& var,
|
||||
std::vector<std::shared_ptr<const VariableValue>> *l) {
|
||||
VariableValues *l) {
|
||||
auto range = this->equal_range(var);
|
||||
|
||||
for (auto it = range.first; it != range.second; ++it) {
|
||||
@@ -96,7 +96,7 @@ void InMemoryPerProcess::resolveSingleMatch(const std::string& var,
|
||||
|
||||
|
||||
void InMemoryPerProcess::resolveMultiMatches(const std::string& var,
|
||||
std::vector<std::shared_ptr<const VariableValue>> *l, variables::KeyExclusions &ke) {
|
||||
VariableValues *l, variables::KeyExclusions &ke) {
|
||||
size_t keySize = var.size();
|
||||
l->reserve(15);
|
||||
|
||||
@@ -120,7 +120,7 @@ void InMemoryPerProcess::resolveMultiMatches(const std::string& var,
|
||||
|
||||
|
||||
void InMemoryPerProcess::resolveRegularExpression(const std::string& var,
|
||||
std::vector<std::shared_ptr<const VariableValue>> *l, variables::KeyExclusions &ke) {
|
||||
VariableValues *l, variables::KeyExclusions &ke) {
|
||||
|
||||
//if (var.find(":") == std::string::npos) {
|
||||
// return;
|
||||
|
||||
@@ -87,12 +87,12 @@ class InMemoryPerProcess :
|
||||
std::unique_ptr<std::string> resolveFirst(const std::string& var) override;
|
||||
|
||||
void resolveSingleMatch(const std::string& var,
|
||||
std::vector<std::shared_ptr<const VariableValue>> *l) override;
|
||||
VariableValues *l) override;
|
||||
void resolveMultiMatches(const std::string& var,
|
||||
std::vector<std::shared_ptr<const VariableValue>> *l,
|
||||
VariableValues *l,
|
||||
variables::KeyExclusions &ke) override;
|
||||
void resolveRegularExpression(const std::string& var,
|
||||
std::vector<std::shared_ptr<const VariableValue>> *l,
|
||||
VariableValues *l,
|
||||
variables::KeyExclusions &ke) override;
|
||||
|
||||
private:
|
||||
|
||||
@@ -262,7 +262,7 @@ end_txn:
|
||||
|
||||
|
||||
void LMDB::resolveSingleMatch(const std::string& var,
|
||||
std::vector<std::shared_ptr<const VariableValue>> *l) {
|
||||
VariableValues *l) {
|
||||
int rc;
|
||||
MDB_txn *txn;
|
||||
MDB_dbi dbi;
|
||||
@@ -465,7 +465,7 @@ end_txn:
|
||||
|
||||
|
||||
void LMDB::resolveMultiMatches(const std::string& var,
|
||||
std::vector<std::shared_ptr<const VariableValue>> *l,
|
||||
VariableValues *l,
|
||||
variables::KeyExclusions &ke) {
|
||||
MDB_val key, data;
|
||||
MDB_txn *txn = NULL;
|
||||
@@ -527,7 +527,7 @@ end_txn:
|
||||
|
||||
|
||||
void LMDB::resolveRegularExpression(const std::string& var,
|
||||
std::vector<std::shared_ptr<const VariableValue>> *l,
|
||||
VariableValues *l,
|
||||
variables::KeyExclusions &ke) {
|
||||
MDB_val key, data;
|
||||
MDB_txn *txn = NULL;
|
||||
|
||||
@@ -66,12 +66,12 @@ class LMDB :
|
||||
std::unique_ptr<std::string> resolveFirst(const std::string& var) override;
|
||||
|
||||
void resolveSingleMatch(const std::string& var,
|
||||
std::vector<std::shared_ptr<const VariableValue>> *l) override;
|
||||
VariableValues *l) override;
|
||||
void resolveMultiMatches(const std::string& var,
|
||||
std::vector<std::shared_ptr<const VariableValue>> *l,
|
||||
VariableValues *l,
|
||||
variables::KeyExclusions &ke) override;
|
||||
void resolveRegularExpression(const std::string& var,
|
||||
std::vector<std::shared_ptr<const VariableValue>> *l,
|
||||
VariableValues *l,
|
||||
variables::KeyExclusions &ke) override;
|
||||
|
||||
private:
|
||||
|
||||
Reference in New Issue
Block a user