diff options
author | Ed Tanous <edtanous@google.com> | 2022-07-01 02:50:15 +0300 |
---|---|---|
committer | Ed Tanous <ed@tanous.net> | 2022-07-12 21:38:38 +0300 |
commit | 02cad96e3a83b0c9a01dbc87219c1b8b6681fa67 (patch) | |
tree | a2dab0f07fe50ed5708f3c6fea43b7d2af5419e7 /http/http_client.hpp | |
parent | bb60f4ded18153718709e23dc1d648eb2ae13743 (diff) | |
download | bmcweb-02cad96e3a83b0c9a01dbc87219c1b8b6681fa67.tar.xz |
Fix const correctness issues
cppcheck correctly notes that a lot of variables in the new code can be
const. Make most of them const.
Tested: WIP
Signed-off-by: Ed Tanous <edtanous@google.com>
Change-Id: I8f37b6353fd707923f533e1d61c5b5419282bf23
Diffstat (limited to 'http/http_client.hpp')
-rw-r--r-- | http/http_client.hpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/http/http_client.hpp b/http/http_client.hpp index 63c2611a2d..f59438be8c 100644 --- a/http/http_client.hpp +++ b/http/http_client.hpp @@ -632,7 +632,7 @@ class HttpClient // Used as a dummy callback by sendData() in order to call // sendDataWithCallback() - static void genericResHandler(Response& res) + static void genericResHandler(const Response& res) { BMCWEB_LOG_DEBUG << "Response handled with return code: " << std::to_string(res.resultInt()); @@ -660,7 +660,7 @@ class HttpClient const boost::beast::http::verb verb, const std::string& retryPolicyName) { - std::function<void(Response&)> cb = genericResHandler; + const std::function<void(const Response&)> cb = genericResHandler; sendDataWithCallback(data, id, destIP, destPort, destUri, httpHeader, verb, retryPolicyName, cb); } |