diff options
author | Ed Tanous <edtanous@google.com> | 2022-01-07 22:38:34 +0300 |
---|---|---|
committer | Ed Tanous <ed@tanous.net> | 2022-01-10 20:36:54 +0300 |
commit | 914e2d5d5dbeddca9f48504256f7089efe86fc65 (patch) | |
tree | b9e60be35e5a15989b5d2d70038e9085dbd6e2bb /redfish-core/lib/ethernet.hpp | |
parent | 711ac7a931dd3f151fc4064063b5ea90404b9054 (diff) | |
download | bmcweb-914e2d5d5dbeddca9f48504256f7089efe86fc65.tar.xz |
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
Diffstat (limited to 'redfish-core/lib/ethernet.hpp')
-rw-r--r-- | redfish-core/lib/ethernet.hpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/redfish-core/lib/ethernet.hpp b/redfish-core/lib/ethernet.hpp index 1097aec750..049f9a6d53 100644 --- a/redfish-core/lib/ethernet.hpp +++ b/redfish-core/lib/ethernet.hpp @@ -1683,13 +1683,13 @@ inline void parseInterfaceData( crow::connections::systemBus->async_method_call( [health](const boost::system::error_code ec, - std::vector<std::string>& resp) { + const std::vector<std::string>& resp) { if (ec) { return; } - health->inventory = std::move(resp); + health->inventory = resp; }, "xyz.openbmc_project.ObjectMapper", "/xyz/openbmc_project/object_mapper", |