From: Kefu Chai Date: Fri, 23 Oct 2020 07:40:41 +0000 (+0800) Subject: mgr: use make_unique<> when appropriate X-Git-Tag: v17.0.0~803^2~2 X-Git-Url: http://git.apps.os.sepia.ceph.com/?a=commitdiff_plain;h=fb725f7cc3d1f3dff81b94c5cf17fcc097cd8b3c;p=ceph.git mgr: use make_unique<> when appropriate Signed-off-by: Kefu Chai --- diff --git a/src/mgr/DaemonHealthMetricCollector.cc b/src/mgr/DaemonHealthMetricCollector.cc index ca864dd5899d9..6467fed0497be 100644 --- a/src/mgr/DaemonHealthMetricCollector.cc +++ b/src/mgr/DaemonHealthMetricCollector.cc @@ -90,10 +90,10 @@ DaemonHealthMetricCollector::create(daemon_metric m) { switch (m) { case daemon_metric::SLOW_OPS: - return unique_ptr{new SlowOps}; + return std::make_unique(); case daemon_metric::PENDING_CREATING_PGS: - return unique_ptr{new PendingPGs}; + return std::make_unique(); default: - return unique_ptr{}; + return {}; } }