From 575e086b6667c0bb8c89153891097938744f1f8a Mon Sep 17 00:00:00 2001 From: gengjiawen Date: Thu, 7 Mar 2019 21:46:54 +0800 Subject: src: apply clang-tidy rule modernize-make-unique PR-URL: https://github.com/nodejs/node/pull/26493 Reviewed-By: Anna Henningsen Reviewed-By: Refael Ackermann Reviewed-By: Ben Noordhuis --- src/node_file.cc | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/node_file.cc') diff --git a/src/node_file.cc b/src/node_file.cc index 137cac7279..79450fd15a 100644 --- a/src/node_file.cc +++ b/src/node_file.cc @@ -341,7 +341,7 @@ int FileHandle::ReadStart() { .ToLocal(&wrap_obj)) { return UV_EBUSY; } - read_wrap.reset(new FileHandleReadWrap(this, wrap_obj)); + read_wrap = std::make_unique(this, wrap_obj); } } int64_t recommended_read = 65536; @@ -1285,8 +1285,8 @@ int MKDirpAsync(uv_loop_t* loop, FSReqBase* req_wrap = FSReqBase::from_req(req); // on the first iteration of algorithm, stash state information. if (req_wrap->continuation_data == nullptr) { - req_wrap->continuation_data = std::unique_ptr{ - new FSContinuationData(req, mode, cb)}; + req_wrap->continuation_data = + std::make_unique(req, mode, cb); req_wrap->continuation_data->PushPath(std::move(path)); } -- cgit v1.2.3