summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorEd Tanous <ed.tanous@intel.com>2019-10-24 21:37:51 +0300
committerJames Feist <james.feist@linux.intel.com>2019-10-29 23:50:35 +0300
commit0f0353b66d52a3060db99495170473c5f98611ec (patch)
treeda66608099135618ff6430570df0dd0415c89451 /include
parentadbe192a68306d403c2546dbc8ebf98ae5a99d7b (diff)
downloadbmcweb-0f0353b66d52a3060db99495170473c5f98611ec.tar.xz
Modernize: use emplace instead of push_back
We had a couple uses of push_back in the code that could be made more efficient with emplace(). Use them instead. Tested: No functional change. Needs tested. Signed-off-by: Ed Tanous <ed.tanous@intel.com> Change-Id: I417601e416b1d0be989617a372978d52670135d8
Diffstat (limited to 'include')
-rw-r--r--include/openbmc_dbus_rest.hpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/include/openbmc_dbus_rest.hpp b/include/openbmc_dbus_rest.hpp
index a4cccb167b..c8673d19a9 100644
--- a/include/openbmc_dbus_rest.hpp
+++ b/include/openbmc_dbus_rest.hpp
@@ -466,7 +466,7 @@ std::vector<std::string> dbusArgSplit(const std::string &string)
{
return ret;
}
- ret.push_back("");
+ ret.emplace_back("");
int containerDepth = 0;
for (std::string::const_iterator character = string.begin();
@@ -488,7 +488,7 @@ std::vector<std::string> dbusArgSplit(const std::string &string)
{
if (character + 1 != string.end())
{
- ret.push_back("");
+ ret.emplace_back("");
}
}
break;
@@ -497,7 +497,7 @@ std::vector<std::string> dbusArgSplit(const std::string &string)
{
if (character + 1 != string.end())
{
- ret.push_back("");
+ ret.emplace_back("");
}
}
break;