asio: Make impl() const

This commit is contained in:
Tatsuhiro Tsujikawa 2015-03-04 02:22:40 +09:00
parent b0c1986a46
commit f6f908a541
5 changed files with 8 additions and 8 deletions

View File

@ -54,7 +54,7 @@ const std::string &request::method() const { return impl_->method(); }
const header_map &request::header() const { return impl_->header(); }
request_impl &request::impl() { return *impl_; }
request_impl &request::impl() const { return *impl_; }
} // namespace client
} // namespace asio_http2

View File

@ -46,7 +46,7 @@ int64_t response::content_length() const { return impl_->content_length(); }
const header_map &response::header() const { return impl_->header(); }
response_impl &response::impl() { return *impl_; }
response_impl &response::impl() const { return *impl_; }
} // namespace client
} // namespace asio_http2

View File

@ -66,7 +66,7 @@ void request::on_data(data_cb cb) const {
void request::on_end(void_cb cb) const { return impl_->on_end(std::move(cb)); }
request_impl &request::impl() { return *impl_; }
request_impl &request::impl() const { return *impl_; }
response::response() : impl_(make_unique<response_impl>()) {}
@ -85,7 +85,7 @@ unsigned int response::status_code() const { return impl_->status_code(); }
bool response::started() const { return impl_->started(); }
response_impl &response::impl() { return *impl_; }
response_impl &response::impl() const { return *impl_; }
request_impl::request_impl() : stream_(nullptr), pushed_(false) {}

View File

@ -149,7 +149,7 @@ public:
bool pushed() const;
// Application must not call this directly.
request_impl &impl();
request_impl &impl() const;
private:
std::unique_ptr<request_impl> impl_;
@ -183,7 +183,7 @@ public:
bool started() const;
// Application must not call this directly.
response_impl &impl();
response_impl &impl() const;
private:
std::unique_ptr<response_impl> impl_;

View File

@ -50,7 +50,7 @@ public:
const header_map &header() const;
response_impl &impl();
response_impl &impl() const;
private:
std::unique_ptr<response_impl> impl_;
@ -82,7 +82,7 @@ public:
const header_map &header() const;
request_impl &impl();
request_impl &impl() const;
private:
std::unique_ptr<request_impl> impl_;