]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
rgw: use std::make_shared to replace new
authorYunchuan Wen <yunchuan.wen@kylin-cloud.com>
Fri, 9 Dec 2016 05:10:28 +0000 (13:10 +0800)
committerYunchuan Wen <yunchuan.wen@kylin-cloud.com>
Fri, 9 Dec 2016 05:45:51 +0000 (13:45 +0800)
Signed-off-by: Yunchuan Wen <yunchuan.wen@kylin-cloud.com>
src/rgw/rgw_sync_module.cc

index 36418e5a28d0c54e7407f9e97c69dece9df31d6b..29c5a9ff926847f1d9ff6b345e75e3c71d06598e 100644 (file)
@@ -54,12 +54,12 @@ int RGWCallStatRemoteObjCR::operate() {
 
 void rgw_register_sync_modules(RGWSyncModulesManager *modules_manager)
 {
-  RGWSyncModuleRef default_module(new RGWDefaultSyncModule());
+  RGWSyncModuleRef default_module(std::make_shared<RGWDefaultSyncModule>());
   modules_manager->register_module("rgw", default_module, true);
 
-  RGWSyncModuleRef log_module(new RGWLogSyncModule());
+  RGWSyncModuleRef log_module(std::make_shared<RGWLogSyncModule>());
   modules_manager->register_module("log", log_module);
 
-  RGWSyncModuleRef es_module(new RGWElasticSyncModule());
+  RGWSyncModuleRef es_module(std::make_shared<RGWElasticSyncModule>());
   modules_manager->register_module("elasticsearch", es_module);
 }