From 2fb6d9337f824788f2967a5ea951d46c8ca4503c Mon Sep 17 00:00:00 2001 From: darionyaphet Date: Fri, 15 Jan 2021 16:54:57 -0800 Subject: [PATCH] Using emplace_back replace push_back (#7568) Summary: Pull Request resolved: https://github.com/facebook/rocksdb/pull/7568 Reviewed By: akankshamahajan15 Differential Revision: D24437383 Pulled By: jay-zhuang fbshipit-source-id: 7c9b3c4944b959aa7796c53b410c2b1055dc5641 --- db/column_family_test.cc | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/db/column_family_test.cc b/db/column_family_test.cc index afb48d56ff..28c5721684 100644 --- a/db/column_family_test.cc +++ b/db/column_family_test.cc @@ -187,8 +187,8 @@ class ColumnFamilyTestBase : public testing::Test { std::vector column_families; names_.clear(); for (size_t i = 0; i < cf.size(); ++i) { - column_families.push_back(ColumnFamilyDescriptor( - cf[i], options.size() == 0 ? column_family_options_ : options[i])); + column_families.emplace_back( + cf[i], options.size() == 0 ? column_family_options_ : options[i]); names_.push_back(cf[i]); } return DB::Open(db_options_, dbname_, column_families, &handles_, &db_); @@ -199,8 +199,8 @@ class ColumnFamilyTestBase : public testing::Test { std::vector column_families; names_.clear(); for (size_t i = 0; i < cf.size(); ++i) { - column_families.push_back(ColumnFamilyDescriptor( - cf[i], options.size() == 0 ? column_family_options_ : options[i])); + column_families.emplace_back( + cf[i], options.size() == 0 ? column_family_options_ : options[i]); names_.push_back(cf[i]); } return DB::OpenForReadOnly(db_options_, dbname_, column_families, &handles_,