Enable readability-avoid-const-params-in-decls
This check involves explicitly declaring variables const when they're
declared auto, which helps in readability, and makes it more clear that
the variables are const.
Signed-off-by: Ed Tanous <edtanous@google.com>
Change-Id: I71198ea03850384a389a56ad26f2c4a48c75b148
diff --git a/http/http_connection.hpp b/http/http_connection.hpp
index 84f5c18..0b58e9b 100644
--- a/http/http_connection.hpp
+++ b/http/http_connection.hpp
@@ -99,8 +99,9 @@
adaptor.set_verify_mode(boost::asio::ssl::verify_peer);
std::string id = "bmcweb";
+ const char* cStr = id.c_str();
// NOLINTNEXTLINE(cppcoreguidelines-pro-type-reinterpret-cast)
- auto* idC = reinterpret_cast<const unsigned char*>(id.c_str());
+ const auto* idC = reinterpret_cast<const unsigned char*>(cStr);
int ret = SSL_set_session_id_context(
adaptor.native_handle(), idC,
static_cast<unsigned int>(id.length()));