Skip to content

Commit

Permalink
mgr: use make_unique<> when appropriate
Browse files Browse the repository at this point in the history
Signed-off-by: Kefu Chai <[email protected]>
  • Loading branch information
tchaikov committed Oct 23, 2020
1 parent 179f6a1 commit fb725f7
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/mgr/DaemonHealthMetricCollector.cc
Original file line number Diff line number Diff line change
Expand Up @@ -90,10 +90,10 @@ DaemonHealthMetricCollector::create(daemon_metric m)
{
switch (m) {
case daemon_metric::SLOW_OPS:
return unique_ptr<DaemonHealthMetricCollector>{new SlowOps};
return std::make_unique<SlowOps>();
case daemon_metric::PENDING_CREATING_PGS:
return unique_ptr<DaemonHealthMetricCollector>{new PendingPGs};
return std::make_unique<PendingPGs>();
default:
return unique_ptr<DaemonHealthMetricCollector>{};
return {};
}
}

0 comments on commit fb725f7

Please sign in to comment.