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
diff --git a/include/authentication.hpp b/include/authentication.hpp
index 3c1ca48..8d59be4 100644
--- a/include/authentication.hpp
+++ b/include/authentication.hpp
@@ -21,7 +21,7 @@
namespace authentication
{
-static void cleanupTempSession(Request& req)
+static void cleanupTempSession(const Request& req)
{
// TODO(ed) THis should really be handled by the persistent data
// middleware, but because it is upstream, it doesn't have access to the
@@ -260,7 +260,7 @@
[[maybe_unused]] static std::shared_ptr<persistent_data::UserSession>
authenticate(
- boost::asio::ip::address& ipAddress [[maybe_unused]],
+ const boost::asio::ip::address& ipAddress [[maybe_unused]],
Response& res [[maybe_unused]], boost::beast::http::verb method,
const boost::beast::http::header<true>& reqHeader,
[[maybe_unused]] const std::shared_ptr<persistent_data::UserSession>&