From 0ee86aec64974b6867518ad40910ee6830ab7999 Mon Sep 17 00:00:00 2001 From: Michael Dawson Date: Tue, 12 May 2020 16:04:02 -0400 Subject: [PATCH] src: prefer make_unique In most of the code base we use make_unique instead of new unique_ptr. Update node_platform.cc to be consistent with that. Signed-off-by: Michael Dawson --- src/node_platform.cc | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/node_platform.cc b/src/node_platform.cc index c5bdc4d33cc9ca..c5ccf8a3b52710 100644 --- a/src/node_platform.cc +++ b/src/node_platform.cc @@ -65,13 +65,13 @@ class WorkerThreadsTaskRunner::DelayedTaskScheduler { } void PostDelayedTask(std::unique_ptr task, double delay_in_seconds) { - tasks_.Push(std::unique_ptr(new ScheduleTask(this, std::move(task), - delay_in_seconds))); + tasks_.Push(std::make_unique(this, std::move(task), + delay_in_seconds)); uv_async_send(&flush_tasks_); } void Stop() { - tasks_.Push(std::unique_ptr(new StopTask(this))); + tasks_.Push(std::make_unique(this)); uv_async_send(&flush_tasks_); }