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

index e73afd802a3e594970154db6db7f71fb9b4fe318..18692a3eeddee342e8b0633c2d9555d0fe44bcec 100644 (file)
@@ -43,7 +43,7 @@ public:
       isal = false;
     }
     if (compressor == 0 || has_isal != isal) {
-      compressor = CompressorRef(new ZlibCompressor(isal));
+      compressor = std::make_shared<ZlibCompressor>(isal);
       has_isal = isal;
     }
     *cs = compressor;