@@ -59,110 +59,110 @@ std::shared_ptr<IntegerCODEC> const& CODECFactory::getFromName(std::string name)
5959}
6060
6161std::unique_ptr<IntegerCODEC> fastbinarypacking8_codec () {
62- return std::unique_ptr<IntegerCODEC>( new CompositeCodec<FastBinaryPacking<8 >, VariableByte>() );
62+ return std::make_unique< CompositeCodec<FastBinaryPacking<8 >, VariableByte>>( );
6363}
6464std::unique_ptr<IntegerCODEC> fastbinarypacking16_codec () {
65- return std::unique_ptr<IntegerCODEC>( new CompositeCodec<FastBinaryPacking<16 >, VariableByte>() );
65+ return std::make_unique< CompositeCodec<FastBinaryPacking<16 >, VariableByte>>( );
6666}
6767std::unique_ptr<IntegerCODEC> fastbinarypacking32_codec () {
68- return std::unique_ptr<IntegerCODEC>( new CompositeCodec<FastBinaryPacking<32 >, VariableByte>() );
68+ return std::make_unique< CompositeCodec<FastBinaryPacking<32 >, VariableByte>>( );
6969}
7070std::unique_ptr<IntegerCODEC> BP32_codec () {
71- return std::unique_ptr<IntegerCODEC>( new CompositeCodec<BP32, VariableByte>() );
71+ return std::make_unique< CompositeCodec<BP32, VariableByte>>( );
7272}
7373std::unique_ptr<IntegerCODEC> vsencoding_codec () {
74- return std::unique_ptr<IntegerCODEC>( new vsencoding::VSEncodingBlocks (1U << 16 ) );
74+ return std::make_unique< vsencoding::VSEncodingBlocks> (1U << 16 );
7575}
7676std::unique_ptr<IntegerCODEC> fastpfor128_codec () {
77- return std::unique_ptr<IntegerCODEC>( new CompositeCodec<FastPFor<4 >, VariableByte>() );
77+ return std::make_unique< CompositeCodec<FastPFor<4 >, VariableByte>>( );
7878}
7979std::unique_ptr<IntegerCODEC> fastpfor256_codec () {
80- return std::unique_ptr<IntegerCODEC>( new CompositeCodec<FastPFor<8 >, VariableByte>() );
80+ return std::make_unique< CompositeCodec<FastPFor<8 >, VariableByte>>( );
8181}
8282std::unique_ptr<IntegerCODEC> simdfastpfor128_codec () {
83- return std::unique_ptr<IntegerCODEC>( new CompositeCodec<SIMDFastPFor<4 >, VariableByte>() );
83+ return std::make_unique< CompositeCodec<SIMDFastPFor<4 >, VariableByte>>( );
8484}
8585std::unique_ptr<IntegerCODEC> simdfastpfor256_codec () {
86- return std::unique_ptr<IntegerCODEC>( new CompositeCodec<SIMDFastPFor<8 >, VariableByte>() );
86+ return std::make_unique< CompositeCodec<SIMDFastPFor<8 >, VariableByte>>( );
8787}
8888std::unique_ptr<IntegerCODEC> simplepfor_codec () {
89- return std::unique_ptr<IntegerCODEC>( new CompositeCodec<SimplePFor<>, VariableByte>() );
89+ return std::make_unique< CompositeCodec<SimplePFor<>, VariableByte>>( );
9090}
9191std::unique_ptr<IntegerCODEC> simdsimplepfor_codec () {
92- return std::unique_ptr<IntegerCODEC>( new CompositeCodec<SIMDSimplePFor<>, VariableByte>() );
92+ return std::make_unique< CompositeCodec<SIMDSimplePFor<>, VariableByte>>( );
9393}
9494std::unique_ptr<IntegerCODEC> pfor_codec () {
95- return std::unique_ptr<IntegerCODEC>( new CompositeCodec<PFor, VariableByte>() );
95+ return std::make_unique< CompositeCodec<PFor, VariableByte>>( );
9696}
9797std::unique_ptr<IntegerCODEC> simdpfor_codec () {
98- return std::unique_ptr<IntegerCODEC>( new CompositeCodec<SIMDPFor, VariableByte>() );
98+ return std::make_unique< CompositeCodec<SIMDPFor, VariableByte>>( );
9999}
100100std::unique_ptr<IntegerCODEC> pfor2008_codec () {
101- return std::unique_ptr<IntegerCODEC>( new CompositeCodec<PFor2008, VariableByte>() );
101+ return std::make_unique< CompositeCodec<PFor2008, VariableByte>>( );
102102}
103103std::unique_ptr<IntegerCODEC> simdnewpfor_codec () {
104- return std::unique_ptr<IntegerCODEC>( new CompositeCodec<SIMDNewPFor<4 , Simple16<false >>, VariableByte>() );
104+ return std::make_unique< CompositeCodec<SIMDNewPFor<4 , Simple16<false >>, VariableByte>>( );
105105}
106106std::unique_ptr<IntegerCODEC> newpfor_codec () {
107- return std::unique_ptr<IntegerCODEC>( new CompositeCodec<NewPFor<4 , Simple16<false >>, VariableByte>() );
107+ return std::make_unique< CompositeCodec<NewPFor<4 , Simple16<false >>, VariableByte>>( );
108108}
109109std::unique_ptr<IntegerCODEC> optpfor_codec () {
110- return std::unique_ptr<IntegerCODEC>( new CompositeCodec<OPTPFor<4 , Simple16<false >>, VariableByte>() );
110+ return std::make_unique< CompositeCodec<OPTPFor<4 , Simple16<false >>, VariableByte>>( );
111111}
112112std::unique_ptr<IntegerCODEC> simdoptpfor_codec () {
113- return std::unique_ptr<IntegerCODEC>( new CompositeCodec<SIMDOPTPFor<4 , Simple16<false >>, VariableByte>() );
113+ return std::make_unique< CompositeCodec<SIMDOPTPFor<4 , Simple16<false >>, VariableByte>>( );
114114}
115115std::unique_ptr<IntegerCODEC> varint_codec () {
116- return std::unique_ptr<IntegerCODEC>( new VariableByte () );
116+ return std::make_unique<VariableByte>( );
117117}
118118std::unique_ptr<IntegerCODEC> vbyte_codec () {
119- return std::unique_ptr<IntegerCODEC>( new VByte () );
119+ return std::make_unique<VByte>( );
120120}
121121std::unique_ptr<IntegerCODEC> maskedvbyte_codec () {
122- return std::unique_ptr<IntegerCODEC>( new MaskedVByte () );
122+ return std::make_unique<MaskedVByte>( );
123123}
124124std::unique_ptr<IntegerCODEC> streamvbyte_codec () {
125- return std::unique_ptr<IntegerCODEC>( new StreamVByte () );
125+ return std::make_unique<StreamVByte>( );
126126}
127127std::unique_ptr<IntegerCODEC> varintgb_codec () {
128- return std::unique_ptr<IntegerCODEC>( new VarIntGB<>() );
128+ return std::make_unique< VarIntGB<>>( );
129129}
130130std::unique_ptr<IntegerCODEC> simple16_codec () {
131- return std::unique_ptr<IntegerCODEC>( new Simple16<true >() );
131+ return std::make_unique< Simple16<true >>( );
132132}
133133std::unique_ptr<IntegerCODEC> simple9_codec () {
134- return std::unique_ptr<IntegerCODEC>( new Simple9<true >() );
134+ return std::make_unique< Simple9<true >>( );
135135}
136136std::unique_ptr<IntegerCODEC> simple9_rle_codec () {
137- return std::unique_ptr<IntegerCODEC>( new Simple9_RLE<true >() );
137+ return std::make_unique< Simple9_RLE<true >>( );
138138}
139139std::unique_ptr<IntegerCODEC> simple8b_codec () {
140- return std::unique_ptr<IntegerCODEC>( new Simple8b<true >() );
140+ return std::make_unique< Simple8b<true >>( );
141141}
142142std::unique_ptr<IntegerCODEC> simple8b_rle_codec () {
143- return std::unique_ptr<IntegerCODEC>( new Simple8b_RLE<true >() );
143+ return std::make_unique< Simple8b_RLE<true >>( );
144144}
145145#ifdef VARINTG8IU_H__
146146std::unique_ptr<IntegerCODEC> varintg8iu_codec () {
147- return std::unique_ptr<IntegerCODEC>( new VarIntG8IU () );
147+ return std::make_unique<VarIntG8IU>( );
148148}
149149#endif
150150#ifdef USESNAPPY
151151std::unique_ptr<IntegerCODEC> snappy_codec () {
152- return std::unique_ptr<IntegerCODEC>( new JustSnappy () );
152+ return std::make_unique<JustSnappy>( );
153153}
154154#endif
155155std::unique_ptr<IntegerCODEC> simdbinarypacking_codec () {
156- return std::unique_ptr<IntegerCODEC>( new CompositeCodec<SIMDBinaryPacking, VariableByte>() );
156+ return std::make_unique< CompositeCodec<SIMDBinaryPacking, VariableByte>>( );
157157}
158158std::unique_ptr<IntegerCODEC> simdgroupsimple_codec () {
159- return std::unique_ptr<IntegerCODEC>( new CompositeCodec<SIMDGroupSimple<false , false >, VariableByte>() );
159+ return std::make_unique< CompositeCodec<SIMDGroupSimple<false , false >, VariableByte>>( );
160160}
161161std::unique_ptr<IntegerCODEC> simdgroupsimple_ringbuf_codec () {
162- return std::unique_ptr<IntegerCODEC>( new CompositeCodec<SIMDGroupSimple<true , true >, VariableByte>() );
162+ return std::make_unique< CompositeCodec<SIMDGroupSimple<true , true >, VariableByte>>( );
163163}
164164std::unique_ptr<IntegerCODEC> copy_codec () {
165- return std::unique_ptr<IntegerCODEC>( new JustCopy () );
165+ return std::make_unique<JustCopy>( );
166166}
167167
168168static CodecMap initializefactory () {
0 commit comments