Cosmetics: Fix coding style

This commit is contained in:
Felipe Zimmerle
2016-07-12 21:39:37 -03:00
parent 3615c84ee5
commit 4cf6c714ac
34 changed files with 109 additions and 69 deletions

View File

@@ -43,4 +43,5 @@ class RemoteUser : public Variable {
} // namespace Variables
} // namespace modsecurity
#endif // SRC_VARIABLES_REMOTE_USER_H_
#endif // SRC_VARIABLES_REMOTE_USER_H_

View File

@@ -32,6 +32,7 @@
#include <vector>
#include <list>
#include <utility>
#include <map>
#include "modsecurity/transaction.h"
#include "modsecurity/rules_properties.h"
@@ -54,7 +55,7 @@ void Rule::evaluateInternal(Transaction *t,
// id
envs.insert(std::pair<std::string, std::string>("RULE:id",
std::to_string(rule->rule_id)));
std::to_string(rule->rule_id)));
// rev
envs.insert(std::pair<std::string, std::string>("RULE:rev",

View File

@@ -30,7 +30,7 @@ namespace Variables {
class Rule : public Variable {
public:
explicit Rule(std::string _name)
: Variable(_name) { };
: Variable(_name) { }
void evaluateInternal(Transaction *transaction,
modsecurity::Rule *rule,

View File

@@ -37,7 +37,8 @@ Variable::Variable(std::string name)
m_isCount(false) {
if (m_name.find(":") != std::string::npos) {
std::string col = toupper(std::string(m_name, 0, m_name.find(":")));
std::string name = std::string(m_name, m_name.find(":") + 1, m_name.size());
std::string name = std::string(m_name, m_name.find(":") + 1,
m_name.size());
if (col == "TX" || col == "IP" || col == "GLOBAL"
|| col == "RESOURCE" || col == "SESSION") {
m_collectionName = col;
@@ -83,7 +84,8 @@ Variable::Variable(std::string name, VariableKind kind)
m_isCount(false) {
if (m_name.find(":") != std::string::npos) {
std::string col = toupper(std::string(m_name, 0, m_name.find(":")));
std::string name = std::string(m_name, m_name.find(":") + 1, m_name.size());
std::string name = std::string(m_name, m_name.find(":") + 1,
m_name.size());
if (col == "TX" || col == "IP" || col == "GLOBAL"
|| col == "RESOURCE" || col == "SESSION") {
m_collectionName = col;