mirror of
https://github.com/owasp-modsecurity/ModSecurity.git
synced 2026-01-01 14:15:46 +03:00
Huge performance improvement: passing variables as pointers avoiding copies
This commit is contained in:
@@ -33,15 +33,11 @@
|
||||
namespace ModSecurity {
|
||||
namespace Variables {
|
||||
|
||||
std::list<std::pair<std::string, std::string>>
|
||||
std::list<ModSecurityStringVar *> *
|
||||
Tx::evaluate(Assay *assay) {
|
||||
std::list<std::pair<std::string, std::string>> resl;
|
||||
std::pair<std::string, std::string> pair;
|
||||
std::list<ModSecurityStringVar *> *resl = new std::list<ModSecurityStringVar *>();
|
||||
|
||||
pair = std::make_pair(std::string("TX:0"),
|
||||
std::string("teste"));
|
||||
|
||||
resl.push_back(pair);
|
||||
resl->push_back(new ModSecurityStringVar("TX:0", "teste"));
|
||||
|
||||
return resl;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user