diff options
author | gengjiawen <technicalcute@gmail.com> | 2019-03-07 16:46:54 +0300 |
---|---|---|
committer | Ruben Bridgewater <ruben@bridgewater.de> | 2019-03-12 22:34:36 +0300 |
commit | 575e086b6667c0bb8c89153891097938744f1f8a (patch) | |
tree | aa5c70a11508b23a8da28d407143dd10021d62bb /src/node_file.cc | |
parent | 90fdf1b0d3811f5e1163d81a403b7e7071d279e5 (diff) |
src: apply clang-tidy rule modernize-make-unique
PR-URL: https://github.com/nodejs/node/pull/26493
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Refael Ackermann <refack@gmail.com>
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Diffstat (limited to 'src/node_file.cc')
-rw-r--r-- | src/node_file.cc | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/node_file.cc b/src/node_file.cc index 137cac72793..79450fd15a4 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<FileHandleReadWrap>(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<FSContinuationData>{ - new FSContinuationData(req, mode, cb)}; + req_wrap->continuation_data = + std::make_unique<FSContinuationData>(req, mode, cb); req_wrap->continuation_data->PushPath(std::move(path)); } |