diff options
author | Ed Tanous <edtanous@google.com> | 2022-06-27 20:39:09 +0300 |
---|---|---|
committer | Ed Tanous <ed@tanous.net> | 2022-07-12 20:17:29 +0300 |
commit | bb60f4ded18153718709e23dc1d648eb2ae13743 (patch) | |
tree | b07ff65c67db207494e56f7af346d6681c805afb /http/http_response.hpp | |
parent | 5600f024edd6be65c58b3664ac48f8103d943ea1 (diff) | |
download | bmcweb-bb60f4ded18153718709e23dc1d648eb2ae13743.tar.xz |
Fix const correctness on http Response object
A number of methods in http::Response were not marked const when they
should've been. This is generally not an issue, as most usages of
Response are in a non-const context, but as we start using const
Response objects more, we need to be more careful about const
correctness.
Tested: Unit tests pass.
Signed-off-by: Ed Tanous <edtanous@google.com>
Change-Id: I8b31e71b6594d9328f106e1367084db42b783b6c
Diffstat (limited to 'http/http_response.hpp')
-rw-r--r-- | http/http_response.hpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/http/http_response.hpp b/http/http_response.hpp index 6c842d742c..d06c65dd82 100644 --- a/http/http_response.hpp +++ b/http/http_response.hpp @@ -71,7 +71,7 @@ struct Response stringResponse->result(v); } - boost::beast::http::status result() + boost::beast::http::status result() const { return stringResponse->result(); } @@ -81,7 +81,7 @@ struct Response return stringResponse->result_int(); } - std::string_view reason() + std::string_view reason() const { return stringResponse->reason(); } @@ -101,7 +101,7 @@ struct Response stringResponse->keep_alive(k); } - bool keepAlive() + bool keepAlive() const { return stringResponse->keep_alive(); } @@ -151,7 +151,7 @@ struct Response } } - bool isAlive() + bool isAlive() const { return isAliveHelper && isAliveHelper(); } |