From f091d4e840fa5208bcab0c1f98743a667a995094 Mon Sep 17 00:00:00 2001 From: gengjiawen Date: Sun, 10 Mar 2019 17:23:56 +0800 Subject: src: apply clang-tidy rule modernize-use-emplace PR-URL: https://github.com/nodejs/node/pull/26564 Reviewed-By: Anna Henningsen Reviewed-By: Ben Noordhuis Reviewed-By: Joyee Cheung --- src/node_file.cc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/node_file.cc') diff --git a/src/node_file.cc b/src/node_file.cc index 95a239ee52..063293e788 100644 --- a/src/node_file.cc +++ b/src/node_file.cc @@ -661,7 +661,7 @@ void AfterScanDirWithTypes(uv_fs_t* req) { return req_wrap->Reject(error); name_v.push_back(filename.ToLocalChecked()); - type_v.push_back(Integer::New(isolate, ent.type)); + type_v.emplace_back(Integer::New(isolate, ent.type)); } Local result = Array::New(isolate, 2); @@ -1508,7 +1508,7 @@ static void ReadDir(const FunctionCallbackInfo& args) { name_v.push_back(filename.ToLocalChecked()); if (with_types) { - type_v.push_back(Integer::New(isolate, ent.type)); + type_v.emplace_back(Integer::New(isolate, ent.type)); } } -- cgit v1.2.3