mirror of
https://github.com/owasp-modsecurity/ModSecurity.git
synced 2025-09-30 03:34:29 +03:00
leverage std::make_unique & std::make_shared
- Simpler code & more efficient because control block can be allocated with object.
This commit is contained in:
@@ -178,7 +178,7 @@ std::unique_ptr<std::string> LMDB::resolveFirst(const std::string& var) {
|
||||
|
||||
collectionData.setFromSerialized(reinterpret_cast<char *>(mdb_value_ret.mv_data), mdb_value_ret.mv_size);
|
||||
if ((!collectionData.isExpired()) && (collectionData.hasValue())) {
|
||||
ret = std::unique_ptr<std::string>(new std::string(collectionData.getValue()));
|
||||
ret = std::make_unique<std::string>(collectionData.getValue());
|
||||
}
|
||||
|
||||
end_get:
|
||||
|
Reference in New Issue
Block a user