Prefer vector#emplace_back over #push_back

This commit is contained in:
Alexander A. Klimov 2019-07-31 11:27:17 +02:00 committed by Michael Friedrich
parent e60ca9bca9
commit 752c5998df
1 changed files with 2 additions and 2 deletions

View File

@ -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"});