@@ -505,7 +505,7 @@ TEST(ObjCache, Destructor) {
505
505
auto vec =
506
506
objcache->create <VectorOfHeapString>(0 /* poolId */ , " test vec string" );
507
507
for (int i = 0 ; i < 10 ; i++) {
508
- vec->push_back (" hello world 0123456789" );
508
+ vec->emplace_back (" hello world 0123456789" );
509
509
}
510
510
// If destructor callback isn't properly executed, we would trigger
511
511
// ASAN failures since std::string has heap storage
@@ -962,7 +962,7 @@ TEST(ObjectCache, PersistenceMultipleTypes) {
962
962
963
963
auto vecStr = objcache->create <VecStr>(
964
964
0 /* poolId */ , " vec_str test " + folly::to<std::string>(j));
965
- vecStr->push_back (" hello world 1234567890" );
965
+ vecStr->emplace_back (" hello world 1234567890" );
966
966
objcache->insertOrReplace (vecStr);
967
967
968
968
auto mapStr = objcache->create <MapStr>(
@@ -1177,7 +1177,7 @@ TEST(ObjectCache, SharedPromiseColocateObject) {
1177
1177
};
1178
1178
std::vector<std::thread> ts;
1179
1179
for (auto & sf : semiFutures) {
1180
- ts.push_back (std::thread{ readString, std::move (sf)} );
1180
+ ts.emplace_back ( readString, std::move (sf));
1181
1181
}
1182
1182
1183
1183
{
@@ -1254,7 +1254,7 @@ TEST(ObjectCache, SharedPromiseColocateObject2) {
1254
1254
};
1255
1255
std::vector<std::thread> ts;
1256
1256
for (auto & sf : semiFutures) {
1257
- ts.push_back (std::thread{ readString, std::move (sf)} );
1257
+ ts.emplace_back ( readString, std::move (sf));
1258
1258
}
1259
1259
1260
1260
{
0 commit comments