summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorPatrick Williams <patrick@stwcx.xyz>2023-05-12 18:10:08 +0300
committerPatrick Williams <patrick@stwcx.xyz>2023-05-12 19:07:07 +0300
commitad539545b8638d934f917e4d711fa7ef48011326 (patch)
tree8ab6181da11fd7a44c7a6a23bbdb6d6256224ce7 /test
parent65a176cdc66922b7d586e088c7ecf0602950ddcf (diff)
downloadbmcweb-ad539545b8638d934f917e4d711fa7ef48011326.tar.xz
use emplace where appropriate per clang-tidy
The clang-tidy warning 'modernize-use-emplace' correctly flags a few places where emplace should be used over push. Signed-off-by: Patrick Williams <patrick@stwcx.xyz> Change-Id: I6ca79285a87d6927e718345dc8dce0387e6b1eda
Diffstat (limited to 'test')
-rw-r--r--test/redfish-core/lib/chassis_test.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/test/redfish-core/lib/chassis_test.cpp b/test/redfish-core/lib/chassis_test.cpp
index 8f181632ba..45d06ae8aa 100644
--- a/test/redfish-core/lib/chassis_test.cpp
+++ b/test/redfish-core/lib/chassis_test.cpp
@@ -33,9 +33,9 @@ void assertChassisResetActionInfoGet(const std::string& chassisId,
parameter["Required"] = true;
parameter["DataType"] = "String";
nlohmann::json::array_t allowed;
- allowed.push_back("PowerCycle");
+ allowed.emplace_back("PowerCycle");
parameter["AllowableValues"] = std::move(allowed);
- parameters.push_back(std::move(parameter));
+ parameters.emplace_back(std::move(parameter));
EXPECT_EQ(res.jsonValue["Parameters"], parameters);
}