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 <edtanous@google.com>
Change-Id: Ib3e0b6edef9803a1c480701556949488406305d4
diff --git a/redfish-core/lib/processor.hpp b/redfish-core/lib/processor.hpp
index cdeb4a0..1155000 100644
--- a/redfish-core/lib/processor.hpp
+++ b/redfish-core/lib/processor.hpp
@@ -832,7 +832,7 @@
const std::string& objPath)
{
crow::connections::systemBus->async_method_call(
- [aResp](boost::system::error_code ec,
+ [aResp](const boost::system::error_code ec,
const OperatingConfigProperties& properties) {
if (ec)
{
@@ -1053,8 +1053,8 @@
// Set the property, with handler to check error responses
crow::connections::systemBus->async_method_call(
- [resp, appliedConfigUri](boost::system::error_code ec,
- sdbusplus::message::message& msg) {
+ [resp, appliedConfigUri](const boost::system::error_code ec,
+ const sdbusplus::message::message& msg) {
handleAppliedConfigResponse(resp, appliedConfigUri, ec, msg);
},
*controlService, cpuObjectPath, "org.freedesktop.DBus.Properties",