summaryrefslogtreecommitdiff
path: root/include/hostname_monitor.hpp
diff options
context:
space:
mode:
authorEd Tanous <edtanous@google.com>2021-12-14 01:39:53 +0300
committerEd Tanous <ed@tanous.net>2021-12-28 00:42:41 +0300
commit168e20c1306e3e689907ba43e14ea679e2328611 (patch)
tree7c578ede3cf14ffaf06ad9fbc245a97b71b21cc9 /include/hostname_monitor.hpp
parentb477fd4408bc0602cc86147121f03791d3f4824a (diff)
downloadbmcweb-168e20c1306e3e689907ba43e14ea679e2328611.tar.xz
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
Diffstat (limited to 'include/hostname_monitor.hpp')
-rw-r--r--include/hostname_monitor.hpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/include/hostname_monitor.hpp b/include/hostname_monitor.hpp
index 1b04af590b..17fbe510c4 100644
--- a/include/hostname_monitor.hpp
+++ b/include/hostname_monitor.hpp
@@ -2,6 +2,7 @@
#ifdef BMCWEB_ENABLE_SSL
#include <boost/container/flat_map.hpp>
#include <dbus_singleton.hpp>
+#include <include/dbus_utility.hpp>
#include <sdbusplus/bus/match.hpp>
#include <sdbusplus/message/types.hpp>
#include <ssl_key_handler.hpp>
@@ -42,7 +43,7 @@ inline int onPropertyUpdate(sd_bus_message* m, void* /* userdata */,
sdbusplus::message::message message(m);
std::string iface;
- boost::container::flat_map<std::string, std::variant<std::string>>
+ boost::container::flat_map<std::string, dbus::utility::DbusVariantType>
changedProperties;
message.read(iface, changedProperties);