Move to common variant
This saves approximately 34kB in the compressed binary size of bmcweb
due to reduced template instantiations. This amounts to a 2.5%
reduction in the overall size.
Note, there were a few places where we broke const-correctness in the
form of pulling a non-const reference out of a const variant. This
new variant now requires const correctness, so some consts are
added where required.
Tested: Code compiles.
Signed-off-by: Ed Tanous <edtanous@google.com>
Change-Id: I6a60c8881c1268627eedb4ffddf16689dc5f6ed2
diff --git a/redfish-core/lib/redfish_util.hpp b/redfish-core/lib/redfish_util.hpp
index 7345f01..c0835b3 100644
--- a/redfish-core/lib/redfish_util.hpp
+++ b/redfish-core/lib/redfish_util.hpp
@@ -16,6 +16,7 @@
#pragma once
#ifndef BMCWEB_ENABLE_REDFISH_ONE_CHASSIS
+#include <dbus_utility.hpp>
namespace redfish
{
@@ -172,8 +173,7 @@
crow::connections::systemBus->async_method_call(
[callback{std::move(callback)}](
const boost::system::error_code ec,
- const std::variant<
- std::vector<std::tuple<std::string, std::string>>>& resp) {
+ const dbus::utility::DbusVariantType& resp) {
if (ec)
{
BMCWEB_LOG_ERROR << ec;