From 752c5998df39704dcd7de740e661d9ec7c516888 Mon Sep 17 00:00:00 2001 From: "Alexander A. Klimov" Date: Wed, 31 Jul 2019 11:27:17 +0200 Subject: [PATCH] Prefer vector#emplace_back over #push_back --- lib/redis/rediswriter-objects.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/redis/rediswriter-objects.cpp b/lib/redis/rediswriter-objects.cpp index 9fba8a067..2c930e380 100644 --- a/lib/redis/rediswriter-objects.cpp +++ b/lib/redis/rediswriter-objects.cpp @@ -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"});