diff options
author | William A. Kennington III <wak@google.com> | 2018-11-06 15:05:11 -0800 |
---|---|---|
committer | William A. Kennington III <wak@google.com> | 2018-11-06 15:05:19 -0800 |
commit | 29a8ed18cccbe70dfe820f228ea04230732d8e4c (patch) | |
tree | 80c1bf5f442e3060e426592e27c7e7bb93ca8def | |
parent | 5902d5f99c1c2028fdc41cdb38b25f0e11d2e3d7 (diff) | |
download | openpower-occ-control-29a8ed18cccbe70dfe820f228ea04230732d8e4c.tar.gz openpower-occ-control-29a8ed18cccbe70dfe820f228ea04230732d8e4c.zip |
powercap: Fix std::variant usage
Only mapbox has the .get() member function. Use the std::get compatible
function instead.
Change-Id: If132312404d1a0322889d6ad7bdb6b1cb399e075
Signed-off-by: William A. Kennington III <wak@google.com>
-rw-r--r-- | powercap.cpp | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/powercap.cpp b/powercap.cpp index bc4d3ca..638d5fe 100644 --- a/powercap.cpp +++ b/powercap.cpp @@ -1,3 +1,4 @@ +#include <cassert> #include <phosphor-logging/log.hpp> #include <powercap.hpp> @@ -82,7 +83,7 @@ uint32_t PowerCap::getPcap() sdbusplus::message::variant<uint32_t> pcap; reply.read(pcap); - return pcap.get<uint32_t>(); + return sdbusplus::message::variant_ns::get<uint32_t>(pcap); } bool PowerCap::getPcapEnabled() @@ -104,7 +105,7 @@ bool PowerCap::getPcapEnabled() sdbusplus::message::variant<bool> pcapEnabled; reply.read(pcapEnabled); - return pcapEnabled.get<bool>(); + return sdbusplus::message::variant_ns::get<bool>(pcapEnabled); } void PowerCap::writeOcc(uint32_t pcapValue) |