diff options
author | gengjiawen <technicalcute@gmail.com> | 2019-03-10 17:23:56 +0800 |
---|---|---|
committer | Daniel Bevenius <daniel.bevenius@gmail.com> | 2019-03-21 07:23:44 +0100 |
commit | f091d4e840fa5208bcab0c1f98743a667a995094 (patch) | |
tree | 0acd16389d0e51fb8403672d2eca0c561030f48d /src/node_file.cc | |
parent | f47adfbda5c06263a78c0c74a705b0d5d3cd2944 (diff) | |
download | android-node-v8-f091d4e840fa5208bcab0c1f98743a667a995094.tar.gz android-node-v8-f091d4e840fa5208bcab0c1f98743a667a995094.tar.bz2 android-node-v8-f091d4e840fa5208bcab0c1f98743a667a995094.zip |
src: apply clang-tidy rule modernize-use-emplace
PR-URL: https://github.com/nodejs/node/pull/26564
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com>
Diffstat (limited to 'src/node_file.cc')
-rw-r--r-- | src/node_file.cc | 4 |
1 files changed, 2 insertions, 2 deletions
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<Array> result = Array::New(isolate, 2); @@ -1508,7 +1508,7 @@ static void ReadDir(const FunctionCallbackInfo<Value>& 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)); } } |