summaryrefslogtreecommitdiffstats
path: root/read_fru_data.cpp
diff options
context:
space:
mode:
authorWilliam A. Kennington III <wak@google.com>2018-10-12 17:18:14 -0700
committerWilliam A. Kennington III <wak@google.com>2018-10-18 15:08:55 -0700
commit4c0080287f2bb19ecfbe5cdd4a334f8769e7d0cd (patch)
treef2edadbb00b55c212c280c90f0cb35d96702bf4e /read_fru_data.cpp
parent1181af741589db873676f177ed85d6bc04884aa1 (diff)
downloadphosphor-host-ipmid-4c0080287f2bb19ecfbe5cdd4a334f8769e7d0cd.tar.gz
phosphor-host-ipmid-4c0080287f2bb19ecfbe5cdd4a334f8769e7d0cd.zip
Convert variant usage to std interface
This is just a refactoring to use the c++17 std::variant interfaces instead of the mapbox::variant specific ones. We should be able to use mapbox::variant and std::variant interchangeably now. Tested: Built against sdbusplus with mapbox::variant and sbusplus using std::variant. Both variant compile and test out. Change-Id: I6fbaad3d12dd34968db6a10f3d74a65e07d0f0cc Signed-off-by: William A. Kennington III <wak@google.com>
Diffstat (limited to 'read_fru_data.cpp')
-rw-r--r--read_fru_data.cpp8
1 files changed, 6 insertions, 2 deletions
diff --git a/read_fru_data.cpp b/read_fru_data.cpp
index c7ff61b..67bbf9f 100644
--- a/read_fru_data.cpp
+++ b/read_fru_data.cpp
@@ -8,6 +8,7 @@
#include <map>
#include <phosphor-logging/elog-errors.hpp>
+#include <sdbusplus/message/types.hpp>
#include <xyz/openbmc_project/Common/error.hpp>
extern const FruMap frus;
@@ -15,6 +16,9 @@ namespace ipmi
{
namespace fru
{
+
+namespace variant_ns = sdbusplus::message::variant_ns;
+
using namespace phosphor::logging;
using InternalFailure =
sdbusplus::xyz::openbmc_project::Common::Error::InternalFailure;
@@ -143,8 +147,8 @@ FruInventoryData readDataFromInventory(const FRUId& fruNum)
{
data[properties.second.section].emplace(
properties.first,
- std::move(
- allProp[properties.first].get<std::string>()));
+ std::move(variant_ns::get<std::string>(
+ allProp[properties.first])));
}
}
}
OpenPOWER on IntegriCloud