diff options
| author | Ed Tanous <edtanous@google.com> | 2022-02-22 21:11:43 +0300 |
|---|---|---|
| committer | Ed Tanous <ed@tanous.net> | 2022-03-02 03:25:02 +0300 |
| commit | 4068129a6cbde8ee8d00a5254ef0961b2b4812e2 (patch) | |
| tree | bcf1be3b89dc77d90f95664f10a927d9cd2ce1d1 | |
| parent | 19b8e9a0764cf932dbe9bcc9e3fb2ab755da74f6 (diff) | |
| download | bmcweb-4068129a6cbde8ee8d00a5254ef0961b2b4812e2.tar.xz | |
Use std::variant
When first committed, I had a misunderstanding of what dedup variant
does. In this case, because we unpack all variants of 64/32 bit and int
vs uint, so in this case, dedup variant doesn't do anything, and just
adds template complexity. In terms of developer readability,
std::variant is a c++ concept that is infinitely googlable, and not
having to look it up through sdbusplus should be better.
Signed-off-by: Ed Tanous <edtanous@google.com>
Change-Id: Ia73b642fd06b24187503196bcdfecb9c896d62c9
| -rw-r--r-- | include/dbus_utility.hpp | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/include/dbus_utility.hpp b/include/dbus_utility.hpp index eefc115aab..481b33dea9 100644 --- a/include/dbus_utility.hpp +++ b/include/dbus_utility.hpp @@ -16,10 +16,10 @@ #pragma once #include <sdbusplus/message.hpp> -#include <sdbusplus/utility/dedup_variant.hpp> #include <filesystem> #include <regex> +#include <variant> namespace dbus { @@ -28,7 +28,7 @@ namespace utility { // clang-format off -using DbusVariantType = sdbusplus::utility::dedup_variant_t< +using DbusVariantType = std::variant< std::vector<std::tuple<std::string, std::string, std::string>>, std::vector<std::string>, std::vector<double>, @@ -42,7 +42,6 @@ using DbusVariantType = sdbusplus::utility::dedup_variant_t< uint16_t, uint8_t, bool, - size_t, sdbusplus::message::unix_fd, std::vector<uint32_t>, std::vector<uint16_t>, |
