We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 7c553cd commit ab2454dCopy full SHA for ab2454d
src/node_platform.cc
@@ -65,13 +65,13 @@ class WorkerThreadsTaskRunner::DelayedTaskScheduler {
65
}
66
67
void PostDelayedTask(std::unique_ptr<Task> task, double delay_in_seconds) {
68
- tasks_.Push(std::unique_ptr<Task>(new ScheduleTask(this, std::move(task),
69
- delay_in_seconds)));
+ tasks_.Push(std::make_unique<ScheduleTask>(this, std::move(task),
+ delay_in_seconds));
70
uv_async_send(&flush_tasks_);
71
72
73
void Stop() {
74
- tasks_.Push(std::unique_ptr<Task>(new StopTask(this)));
+ tasks_.Push(std::make_unique<StopTask>(this));
75
76
77
0 commit comments