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/tracing | |
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/tracing')
-rw-r--r-- | src/tracing/node_trace_buffer.cc | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/tracing/node_trace_buffer.cc b/src/tracing/node_trace_buffer.cc index d2cfd023665..e187a1d78c8 100644 --- a/src/tracing/node_trace_buffer.cc +++ b/src/tracing/node_trace_buffer.cc @@ -1,4 +1,6 @@ #include "tracing/node_trace_buffer.h" + +#include <memory> #include "util-inl.h" namespace node { @@ -19,7 +21,7 @@ TraceObject* InternalTraceBuffer::AddTraceEvent(uint64_t* handle) { if (chunk) { chunk->Reset(current_chunk_seq_++); } else { - chunk.reset(new TraceBufferChunk(current_chunk_seq_++)); + chunk = std::make_unique<TraceBufferChunk>(current_chunk_seq_++); } } auto& chunk = chunks_[total_chunks_ - 1]; |