diff options
author | Vernon Mauery <vernon.mauery@linux.intel.com> | 2019-04-09 11:44:36 -0700 |
---|---|---|
committer | Vernon Mauery <vernon.mauery@linux.intel.com> | 2019-04-18 22:40:32 +0000 |
commit | f442e119aed2dc87f320bf230ad39e7dc5c72524 (patch) | |
tree | fe834d199e48249934b3c84aa92db536aea3ef25 /sensordatahandler.hpp | |
parent | 5b2535f89023d0ea220ccc24200a9b51c142c08d (diff) | |
download | phosphor-host-ipmid-f442e119aed2dc87f320bf230ad39e7dc5c72524.tar.gz phosphor-host-ipmid-f442e119aed2dc87f320bf230ad39e7dc5c72524.zip |
move variant to std namespace
sdbusplus::message::variant_ns has been std for a while now. This moves
ipmid away from sdbusplus::message::variant_ns to directly use
std::variant.
Tested-by: built, compiles, and runs the same as before.
Change-Id: I8caa945f31c926c2721319f001b9d7f83fd3f1b7
Signed-off-by: Vernon Mauery <vernon.mauery@linux.intel.com>
Diffstat (limited to 'sensordatahandler.hpp')
-rw-r--r-- | sensordatahandler.hpp | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/sensordatahandler.hpp b/sensordatahandler.hpp index 6d80f9a..a7eadda 100644 --- a/sensordatahandler.hpp +++ b/sensordatahandler.hpp @@ -13,8 +13,6 @@ namespace ipmi namespace sensor { -namespace variant_ns = sdbusplus::message::variant_ns; - using Assertion = uint16_t; using Deassertion = uint16_t; using AssertionSet = std::pair<Assertion, Deassertion>; @@ -166,7 +164,7 @@ GetSensorResponse readingAssertion(const Info& sensorInfo) sensorInfo.propertyInterfaces.begin()->first, sensorInfo.propertyInterfaces.begin()->second.begin()->first); - setAssertionBytes(static_cast<uint16_t>(variant_ns::get<T>(propValue)), + setAssertionBytes(static_cast<uint16_t>(std::get<T>(propValue)), responseData); return response; @@ -197,7 +195,7 @@ GetSensorResponse readingData(const Info& sensorInfo) sensorInfo.propertyInterfaces.begin()->first, sensorInfo.propertyInterfaces.begin()->second.begin()->first); - double value = variant_ns::get<T>(propValue) * + double value = std::get<T>(propValue) * std::pow(10, sensorInfo.scale - sensorInfo.exponentR); auto rawData = static_cast<uint8_t>((value - sensorInfo.scaledOffset) / |