mirror of
https://github.com/owasp-modsecurity/ModSecurity.git
synced 2025-09-30 03:34:29 +03:00
Simplified lifetime management of tests
- Addresses Sonarcloud issues: - Rewrite the code so that you no longer need this "delete". - Make the type of this variable a reference-to-const.
This commit is contained in:
@@ -29,7 +29,7 @@ extern std::string default_test_path;
|
||||
namespace modsecurity_test {
|
||||
|
||||
template <class T> class ModSecurityTest :
|
||||
public std::unordered_map<std::string, std::vector<T *> *> {
|
||||
public std::unordered_map<std::string, std::vector<std::unique_ptr<T>>> {
|
||||
public:
|
||||
ModSecurityTest()
|
||||
: m_test_number(0),
|
||||
|
Reference in New Issue
Block a user