mirror of
https://github.com/Icinga/icinga2.git
synced 2025-07-24 22:24:44 +02:00
RedisWriter#GenerateHmsetStatements(): reduce memory allocations
This commit is contained in:
parent
23448b0322
commit
c24092a64e
@ -255,11 +255,10 @@ std::map<String, std::vector<String> > RedisWriter::GenerateHmsetStatements(cons
|
|||||||
{
|
{
|
||||||
std::map<String, std::vector<String> > statements;
|
std::map<String, std::vector<String> > statements;
|
||||||
for (auto& key : keys) {
|
for (auto& key : keys) {
|
||||||
std::vector<String> statement = {"HMSET", key};
|
statements.emplace(key, std::vector<String>({"HMSET", key}));
|
||||||
statements.insert(std::pair<String, std::vector<String> >(key, statement));
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return statements;
|
return std::move(statements);
|
||||||
}
|
}
|
||||||
|
|
||||||
std::vector<String> RedisWriter::GetTypeObjectKeys(const String& type)
|
std::vector<String> RedisWriter::GetTypeObjectKeys(const String& type)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user