From afeb56274471510c04109af391753266840b5f1e Mon Sep 17 00:00:00 2001 From: Alexey Milovidov Date: Wed, 23 Jun 2021 00:29:20 +0300 Subject: [PATCH] Small change in Roaring Bitmaps --- src/AggregateFunctions/AggregateFunctionGroupBitmapData.h | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/AggregateFunctions/AggregateFunctionGroupBitmapData.h b/src/AggregateFunctions/AggregateFunctionGroupBitmapData.h index 63acc2a5f0c..067daf6dc3a 100644 --- a/src/AggregateFunctions/AggregateFunctionGroupBitmapData.h +++ b/src/AggregateFunctions/AggregateFunctionGroupBitmapData.h @@ -1,6 +1,7 @@ #pragma once #include +#include #include #include #include @@ -43,7 +44,7 @@ private: void toLarge() { - rb = std::make_shared(); + rb = std::make_unique(); for (const auto & x : small) rb->add(static_cast(x.getValue())); small.clear(); @@ -113,7 +114,7 @@ public: readVarUInt(size, in); std::unique_ptr buf(new char[size]); in.readStrict(buf.get(), size); - rb = std::make_shared(RoaringBitmap::read(buf.get())); + rb = std::make_unique(RoaringBitmap::read(buf.get())); } } @@ -140,7 +141,7 @@ public: */ std::shared_ptr getNewRoaringBitmapFromSmall() const { - std::shared_ptr ret = std::make_shared(); + std::shared_ptr ret = std::make_unique(); for (const auto & x : small) ret->add(static_cast(x.getValue())); return ret;