mirror of
https://github.com/Icinga/icinga2.git
synced 2025-07-29 16:44:29 +02:00
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) {
|
if (states.size() > 2) {
|
||||||
transaction.push_back(std::move(states));
|
transaction.emplace_back(std::move(states));
|
||||||
states = {"HMSET", m_PrefixStateObject + lcType};
|
states = {"HMSET", m_PrefixStateObject + lcType};
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -180,7 +180,7 @@ void RedisWriter::UpdateAllConfigObjects()
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (states.size() > 2)
|
if (states.size() > 2)
|
||||||
transaction.push_back(std::move(states));
|
transaction.emplace_back(std::move(states));
|
||||||
|
|
||||||
if (transaction.size() > 1) {
|
if (transaction.size() > 1) {
|
||||||
transaction.push_back({"EXEC"});
|
transaction.push_back({"EXEC"});
|
||||||
|
Loading…
x
Reference in New Issue
Block a user