]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
mgr: use make_unique<> when appropriate
authorKefu Chai <kchai@redhat.com>
Fri, 23 Oct 2020 07:40:41 +0000 (15:40 +0800)
committerKefu Chai <kchai@redhat.com>
Fri, 23 Oct 2020 08:02:16 +0000 (16:02 +0800)
Signed-off-by: Kefu Chai <kchai@redhat.com>
src/mgr/DaemonHealthMetricCollector.cc

index ca864dd5899d9c62c704f09942e804eb1021af38..6467fed0497be06e6d45cdb773e93eece9e5cf85 100644 (file)
@@ -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 {};
   }
 }