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/virtual_media.hpp b/redfish-core/lib/virtual_media.hpp
index 34c1c4b..747ca43 100644
--- a/redfish-core/lib/virtual_media.hpp
+++ b/redfish-core/lib/virtual_media.hpp
@@ -671,7 +671,7 @@
constexpr const size_t secretLimit = 1024;
std::shared_ptr<SecurePipe> secretPipe;
- std::variant<int, SecurePipe::unix_fd> unixFd = -1;
+ dbus::utility::DbusVariantType unixFd = -1;
if (!userName.empty() || !password.empty())
{