summaryrefslogtreecommitdiff
path: root/src/node_process_methods.cc
diff options
context:
space:
mode:
authorgengjiawen <technicalcute@gmail.com>2019-03-10 17:23:56 +0800
committerDaniel Bevenius <daniel.bevenius@gmail.com>2019-03-21 07:23:44 +0100
commitf091d4e840fa5208bcab0c1f98743a667a995094 (patch)
tree0acd16389d0e51fb8403672d2eca0c561030f48d /src/node_process_methods.cc
parentf47adfbda5c06263a78c0c74a705b0d5d3cd2944 (diff)
downloadandroid-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_process_methods.cc')
-rw-r--r--src/node_process_methods.cc4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/node_process_methods.cc b/src/node_process_methods.cc
index 3cf2670a88..d2ba00b89b 100644
--- a/src/node_process_methods.cc
+++ b/src/node_process_methods.cc
@@ -255,7 +255,7 @@ static void GetActiveRequests(const FunctionCallbackInfo<Value>& args) {
AsyncWrap* w = req_wrap->GetAsyncWrap();
if (w->persistent().IsEmpty())
continue;
- request_v.push_back(w->GetOwner());
+ request_v.emplace_back(w->GetOwner());
}
args.GetReturnValue().Set(
@@ -271,7 +271,7 @@ void GetActiveHandles(const FunctionCallbackInfo<Value>& args) {
for (auto w : *env->handle_wrap_queue()) {
if (!HandleWrap::HasRef(w))
continue;
- handle_v.push_back(w->GetOwner());
+ handle_v.emplace_back(w->GetOwner());
}
args.GetReturnValue().Set(
Array::New(env->isolate(), handle_v.data(), handle_v.size()));