mirror of
https://github.com/owasp-modsecurity/ModSecurity.git
synced 2025-10-04 05:22:57 +03:00
Uses shared_ptr on variable names
This commit is contained in:
@@ -44,7 +44,7 @@ bool RulesExceptions::loadUpdateTargetByTag(const std::string &tag,
|
||||
std::string *error) {
|
||||
|
||||
for (auto &i : *var) {
|
||||
m_variable_update_target_by_tag.emplace(std::pair<std::string, std::unique_ptr<Variables::Variable>>(tag, std::move(i)));
|
||||
m_variable_update_target_by_tag.emplace(std::pair<std::shared_ptr<std::string>, std::unique_ptr<Variables::Variable>>(std::make_shared<std::string>(tag), std::move(i)));
|
||||
}
|
||||
|
||||
return true;
|
||||
@@ -164,7 +164,7 @@ bool RulesExceptions::merge(RulesExceptions& from) {
|
||||
}
|
||||
|
||||
for (auto &p : from.m_variable_update_target_by_tag) {
|
||||
m_variable_update_target_by_tag.emplace(std::pair<std::string, std::unique_ptr<Variables::Variable>>(p.first, std::move(p.second)));
|
||||
m_variable_update_target_by_tag.emplace(std::pair<std::shared_ptr<std::string>, std::unique_ptr<Variables::Variable>>(p.first, std::move(p.second)));
|
||||
}
|
||||
|
||||
for (auto &p : from.m_variable_update_target_by_id) {
|
||||
|
Reference in New Issue
Block a user