From 914e2d5d5dbeddca9f48504256f7089efe86fc65 Mon Sep 17 00:00:00 2001 From: Ed Tanous Date: Fri, 7 Jan 2022 11:38:34 -0800 Subject: Enforce const correctness For all async calls, we should be consistently capturing non trivial objects by const reference. This corrects bmcweb to be consistent and capture errors by const value, and objects by const reference. Tested: Code compiles. Trivial changes. This saves about 300 bytes on our compressed binary size. Signed-off-by: Ed Tanous Change-Id: Ib3e0b6edef9803a1c480701556949488406305d4 --- include/hostname_monitor.hpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'include/hostname_monitor.hpp') diff --git a/include/hostname_monitor.hpp b/include/hostname_monitor.hpp index 17fbe510c4..65a5c1c34a 100644 --- a/include/hostname_monitor.hpp +++ b/include/hostname_monitor.hpp @@ -16,7 +16,7 @@ static std::unique_ptr hostnameSignalMonitor; inline void installCertificate(const std::filesystem::path& certPath) { crow::connections::systemBus->async_method_call( - [certPath](boost::system::error_code ec) { + [certPath](const boost::system::error_code ec) { if (ec) { BMCWEB_LOG_ERROR << "Replace Certificate Fail.."; -- cgit v1.2.3