@@ -94,13 +94,13 @@ class zlib_filter
9494
9595public:
9696 zlib_filter (
97- const rts::context* ctx,
97+ const rts::context& ctx,
9898 http_proto::detail::workspace& ws,
9999 int comp_level,
100100 int window_bits,
101101 int mem_level)
102102 : zlib_filter_base(ws)
103- , svc_(ctx-> get_service<rts::zlib::deflate_service>())
103+ , svc_(ctx. get_service<rts::zlib::deflate_service>())
104104 {
105105 system::error_code ec = static_cast <rts::zlib::error>(svc_.init2 (
106106 strm_,
@@ -160,11 +160,11 @@ class brotli_filter
160160
161161public:
162162 brotli_filter (
163- const rts::context* ctx,
163+ const rts::context& ctx,
164164 http_proto::detail::workspace&,
165165 std::uint32_t comp_quality,
166166 std::uint32_t comp_window)
167- : svc_(ctx-> get_service<rts::brotli::encode_service>())
167+ : svc_(ctx. get_service<rts::brotli::encode_service>())
168168 {
169169 // TODO: use custom allocator
170170 state_ = svc_.create_instance (nullptr , nullptr , nullptr );
@@ -242,7 +242,7 @@ class serializer_service
242242 std::size_t space_needed = 0 ;
243243
244244 serializer_service (
245- rts::context&,
245+ const rts::context&,
246246 serializer::config const & cfg_)
247247 : cfg(cfg_)
248248 {
@@ -719,7 +719,7 @@ start_init(
719719 if (!svc_->cfg .apply_deflate_encoder )
720720 goto no_filter;
721721 filter_ = &ws_.emplace <zlib_filter>(
722- ctx_,
722+ * ctx_,
723723 ws_,
724724 svc_->cfg .zlib_comp_level ,
725725 svc_->cfg .zlib_window_bits ,
@@ -731,7 +731,7 @@ start_init(
731731 if (!svc_->cfg .apply_gzip_encoder )
732732 goto no_filter;
733733 filter_ = &ws_.emplace <zlib_filter>(
734- ctx_,
734+ * ctx_,
735735 ws_,
736736 svc_->cfg .zlib_comp_level ,
737737 svc_->cfg .zlib_window_bits + 16 ,
@@ -743,7 +743,7 @@ start_init(
743743 if (!svc_->cfg .apply_brotli_encoder )
744744 goto no_filter;
745745 filter_ = &ws_.emplace <brotli_filter>(
746- ctx_,
746+ * ctx_,
747747 ws_,
748748 svc_->cfg .brotli_comp_quality ,
749749 svc_->cfg .brotli_comp_window );
0 commit comments