Use make_unique to create unique ptr

This commit is contained in:
Ervin Hegedus 2024-03-27 16:33:05 +01:00
parent ca7c0ae0b9
commit 1b6b631617
No known key found for this signature in database
GPG Key ID: 5FA5BC3F5EC41F61

View File

@ -32,7 +32,7 @@ void print_help(const char *name) {
int main(int argc, char **argv) {
std::unique_ptr<modsecurity::RulesSet> rules (new modsecurity::RulesSet());
std::unique_ptr<modsecurity::RulesSet> rules = std::make_unique<modsecurity::RulesSet>();
char **args = argv;
int ret = 0;
@ -45,7 +45,7 @@ int main(int argc, char **argv) {
while (*args != NULL) {
struct stat buffer;
std::string arg = (*args);
std::string arg = *args;
std::string err;
int r;