mirror of
https://github.com/owasp-modsecurity/ModSecurity.git
synced 2025-09-30 03:34:29 +03:00
Instantiates the Class variable earlier
Avoid the instantiation for every call
This commit is contained in:
committed by
Felipe Zimmerle
parent
ba6b972ca8
commit
9a8fc3116a
@@ -33,10 +33,16 @@ namespace collection {
|
||||
|
||||
class Variable {
|
||||
public:
|
||||
Variable(const std::string *key) :
|
||||
m_key(key),
|
||||
m_value(),
|
||||
m_dynamic_value(false),
|
||||
m_dynamic(false) { }
|
||||
Variable(const std::string *key, const std::string *value) :
|
||||
m_key(key),
|
||||
m_value(value),
|
||||
m_dynamic_value(false) { }
|
||||
m_dynamic_value(false),
|
||||
m_dynamic(false) { }
|
||||
|
||||
~Variable() {
|
||||
if (m_dynamic_value) {
|
||||
@@ -47,6 +53,7 @@ class Variable {
|
||||
const std::string *m_key;
|
||||
const std::string *m_value;
|
||||
bool m_dynamic_value;
|
||||
bool m_dynamic;
|
||||
};
|
||||
|
||||
} // namespace collection
|
||||
|
Reference in New Issue
Block a user