@@ -156,7 +156,7 @@ class zlib_compressor_base : public compress_provider
156
156
157
157
private:
158
158
int m_state{Z_BUF_ERROR};
159
- z_stream m_stream{0 };
159
+ z_stream m_stream{};
160
160
const utility::string_t & m_algorithm;
161
161
};
162
162
@@ -263,7 +263,7 @@ class zlib_decompressor_base : public decompress_provider
263
263
264
264
private:
265
265
int m_state{Z_BUF_ERROR};
266
- z_stream m_stream{0 };
266
+ z_stream m_stream{};
267
267
const utility::string_t & m_algorithm;
268
268
};
269
269
@@ -283,7 +283,7 @@ class gzip_compressor : public zlib_compressor_base
283
283
class gzip_decompressor : public zlib_decompressor_base
284
284
{
285
285
public:
286
- gzip_decompressor::gzip_decompressor () : zlib_decompressor_base(16 ) // gzip auto-detect
286
+ gzip_decompressor () : zlib_decompressor_base(16 ) // gzip auto-detect
287
287
{
288
288
}
289
289
};
@@ -620,7 +620,7 @@ class generic_decompress_factory : public decompress_factory
620
620
621
621
const utility::string_t & algorithm () const { return m_algorithm; }
622
622
623
- const uint16_t weight () const { return m_weight; }
623
+ uint16_t weight () const { return m_weight; }
624
624
625
625
std::unique_ptr<decompress_provider> make_decompressor () const { return _make_decompressor (); }
626
626
@@ -634,14 +634,14 @@ class generic_decompress_factory : public decompress_factory
634
634
static const std::vector<std::shared_ptr<compress_factory>> g_compress_factories
635
635
#if defined(CPPREST_HTTP_COMPRESSION)
636
636
= {std::make_shared<generic_compress_factory>(
637
- algorithm::GZIP, []() -> std::unique_ptr<compress_provider> { return std ::make_unique<gzip_compressor>(); }),
637
+ algorithm::GZIP, []() -> std::unique_ptr<compress_provider> { return utility::details ::make_unique<gzip_compressor>(); }),
638
638
std::make_shared<generic_compress_factory>(
639
639
algorithm::DEFLATE,
640
- []() -> std::unique_ptr<compress_provider> { return std ::make_unique<deflate_compressor>(); }),
640
+ []() -> std::unique_ptr<compress_provider> { return utility::details ::make_unique<deflate_compressor>(); }),
641
641
#if defined(CPPREST_BROTLI_COMPRESSION)
642
642
std::make_shared<generic_compress_factory>(
643
643
algorithm::BROTLI,
644
- []() -> std::unique_ptr<compress_provider> { return std ::make_unique<brotli_compressor>(); })
644
+ []() -> std::unique_ptr<compress_provider> { return utility::details ::make_unique<brotli_compressor>(); })
645
645
#endif // CPPREST_BROTLI_COMPRESSION
646
646
};
647
647
#else // CPPREST_HTTP_COMPRESSION
@@ -653,16 +653,16 @@ static const std::vector<std::shared_ptr<decompress_factory>> g_decompress_facto
653
653
= {std::make_shared<generic_decompress_factory>(
654
654
algorithm::GZIP,
655
655
500 ,
656
- []() -> std::unique_ptr<decompress_provider> { return std ::make_unique<gzip_decompressor>(); }),
656
+ []() -> std::unique_ptr<decompress_provider> { return utility::details ::make_unique<gzip_decompressor>(); }),
657
657
std::make_shared<generic_decompress_factory>(
658
658
algorithm::DEFLATE,
659
659
500 ,
660
- []() -> std::unique_ptr<decompress_provider> { return std ::make_unique<deflate_decompressor>(); }),
660
+ []() -> std::unique_ptr<decompress_provider> { return utility::details ::make_unique<deflate_decompressor>(); }),
661
661
#if defined(CPPREST_BROTLI_COMPRESSION)
662
662
std::make_shared<generic_decompress_factory>(
663
663
algorithm::BROTLI,
664
664
500 ,
665
- []() -> std::unique_ptr<decompress_provider> { return std ::make_unique<brotli_decompressor>(); })
665
+ []() -> std::unique_ptr<decompress_provider> { return utility::details ::make_unique<brotli_decompressor>(); })
666
666
#endif // CPPREST_BROTLI_COMPRESSION
667
667
};
668
668
#else // CPPREST_HTTP_COMPRESSION
@@ -751,7 +751,7 @@ std::shared_ptr<decompress_factory> get_decompress_factory(const utility::string
751
751
std::unique_ptr<compress_provider> make_gzip_compressor (int compressionLevel, int method, int strategy, int memLevel)
752
752
{
753
753
#if defined(CPPREST_HTTP_COMPRESSION)
754
- return std::move (std ::make_unique<gzip_compressor>(compressionLevel, method, strategy, memLevel) );
754
+ return utility::details ::make_unique<gzip_compressor>(compressionLevel, method, strategy, memLevel);
755
755
#else // CPPREST_HTTP_COMPRESSION
756
756
return std::unique_ptr<compress_provider>();
757
757
#endif // CPPREST_HTTP_COMPRESSION
@@ -760,7 +760,7 @@ std::unique_ptr<compress_provider> make_gzip_compressor(int compressionLevel, in
760
760
std::unique_ptr<compress_provider> make_deflate_compressor (int compressionLevel, int method, int strategy, int memLevel)
761
761
{
762
762
#if defined(CPPREST_HTTP_COMPRESSION)
763
- return std::move (std ::make_unique<deflate_compressor>(compressionLevel, method, strategy, memLevel) );
763
+ return utility::details ::make_unique<deflate_compressor>(compressionLevel, method, strategy, memLevel);
764
764
#else // CPPREST_HTTP_COMPRESSION
765
765
return std::unique_ptr<compress_provider>();
766
766
#endif // CPPREST_HTTP_COMPRESSION
@@ -769,7 +769,7 @@ std::unique_ptr<compress_provider> make_deflate_compressor(int compressionLevel,
769
769
std::unique_ptr<compress_provider> make_brotli_compressor (uint32_t window, uint32_t quality, uint32_t mode)
770
770
{
771
771
#if defined(CPPREST_HTTP_COMPRESSION) && defined(CPPREST_BROTLI_COMPRESSION)
772
- return std::move (std ::make_unique<brotli_compressor>(window, quality, mode) );
772
+ return utility::details ::make_unique<brotli_compressor>(window, quality, mode);
773
773
#else // CPPREST_BROTLI_COMPRESSION
774
774
return std::unique_ptr<compress_provider>();
775
775
#endif // CPPREST_BROTLI_COMPRESSION
@@ -951,7 +951,7 @@ std::unique_ptr<compress_provider> get_compressor_from_header(
951
951
952
952
if (compressor)
953
953
{
954
- return std::move ( compressor) ;
954
+ return compressor;
955
955
}
956
956
957
957
// If we're here, we didn't match the caller's compressor above;
@@ -965,7 +965,7 @@ std::unique_ptr<compress_provider> get_compressor_from_header(
965
965
auto compressor = web::http::compression::builtin::_make_compressor (f, coding);
966
966
if (compressor)
967
967
{
968
- return std::move ( compressor) ;
968
+ return compressor;
969
969
}
970
970
if (type == header_types::accept_encoding && utility::details::str_iequal (coding, _XPLATSTR (" identity" )))
971
971
{
@@ -1068,7 +1068,7 @@ std::unique_ptr<decompress_provider> get_decompressor_from_header(
1068
1068
1069
1069
// Either the response is compressed and we have a decompressor that can handle it, or
1070
1070
// built-in compression is not enabled and we don't have an alternate set of decompressors
1071
- return std::move ( decompressor) ;
1071
+ return decompressor;
1072
1072
}
1073
1073
1074
1074
utility::string_t build_supported_header (header_types type,
@@ -1084,7 +1084,7 @@ utility::string_t build_supported_header(header_types type,
1084
1084
// Add all specified algorithms and their weights to the header
1085
1085
start = true ;
1086
1086
os.imbue (std::locale::classic ());
1087
- for each (auto & factory in f)
1087
+ for (auto & factory : f)
1088
1088
{
1089
1089
if (factory)
1090
1090
{
@@ -1109,7 +1109,7 @@ utility::string_t build_supported_header(header_types type,
1109
1109
os << _XPLATSTR (" identity;q=1, *;q=0" );
1110
1110
}
1111
1111
1112
- return std::move ( os.str () );
1112
+ return os.str ();
1113
1113
}
1114
1114
} // namespace details
1115
1115
} // namespace compression
0 commit comments