Skip to content

Commit a0f5b10

Browse files
generatedunixname89002005287564facebook-github-bot
authored andcommitted
Fix CQS signal modernize-use-emplace in fbcode/cachelib/experimental
Differential Revision: D82422642 fbshipit-source-id: 19379a9e1f058acd60f128a690ab3ca9aa051f8b
1 parent 3a39f65 commit a0f5b10

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

cachelib/experimental/deprecated_objcache/tests/ObjectCacheTest.cpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -505,7 +505,7 @@ TEST(ObjCache, Destructor) {
505505
auto vec =
506506
objcache->create<VectorOfHeapString>(0 /* poolId */, "test vec string");
507507
for (int i = 0; i < 10; i++) {
508-
vec->push_back("hello world 0123456789");
508+
vec->emplace_back("hello world 0123456789");
509509
}
510510
// If destructor callback isn't properly executed, we would trigger
511511
// ASAN failures since std::string has heap storage
@@ -962,7 +962,7 @@ TEST(ObjectCache, PersistenceMultipleTypes) {
962962

963963
auto vecStr = objcache->create<VecStr>(
964964
0 /* poolId */, "vec_str test " + folly::to<std::string>(j));
965-
vecStr->push_back("hello world 1234567890");
965+
vecStr->emplace_back("hello world 1234567890");
966966
objcache->insertOrReplace(vecStr);
967967

968968
auto mapStr = objcache->create<MapStr>(
@@ -1177,7 +1177,7 @@ TEST(ObjectCache, SharedPromiseColocateObject) {
11771177
};
11781178
std::vector<std::thread> ts;
11791179
for (auto& sf : semiFutures) {
1180-
ts.push_back(std::thread{readString, std::move(sf)});
1180+
ts.emplace_back(readString, std::move(sf));
11811181
}
11821182

11831183
{
@@ -1254,7 +1254,7 @@ TEST(ObjectCache, SharedPromiseColocateObject2) {
12541254
};
12551255
std::vector<std::thread> ts;
12561256
for (auto& sf : semiFutures) {
1257-
ts.push_back(std::thread{readString, std::move(sf)});
1257+
ts.emplace_back(readString, std::move(sf));
12581258
}
12591259

12601260
{

0 commit comments

Comments
 (0)