mirror of https://github.com/Icinga/icinga2.git
Prefer vector#emplace_back over #push_back
This commit is contained in:
parent
e60ca9bca9
commit
752c5998df
|
@ -158,7 +158,7 @@ void RedisWriter::UpdateAllConfigObjects()
|
|||
}
|
||||
|
||||
if (states.size() > 2) {
|
||||
transaction.push_back(std::move(states));
|
||||
transaction.emplace_back(std::move(states));
|
||||
states = {"HMSET", m_PrefixStateObject + lcType};
|
||||
}
|
||||
|
||||
|
@ -180,7 +180,7 @@ void RedisWriter::UpdateAllConfigObjects()
|
|||
}
|
||||
|
||||
if (states.size() > 2)
|
||||
transaction.push_back(std::move(states));
|
||||
transaction.emplace_back(std::move(states));
|
||||
|
||||
if (transaction.size() > 1) {
|
||||
transaction.push_back({"EXEC"});
|
||||
|
|
Loading…
Reference in New Issue