diff options
author | Patrick Venture <venture@google.com> | 2018-09-07 19:56:18 -0700 |
---|---|---|
committer | Patrick Venture <venture@google.com> | 2018-09-25 10:06:52 -0700 |
commit | 586d35b40ec6ac667f19bee3d0258b2cdd3824c2 (patch) | |
tree | 0c770a604b6cf0feef34142a9035fc986023a8b7 /sensordatahandler.hpp | |
parent | 46470a38d0a3b8f29cd8efc4af8a76adcace524a (diff) | |
download | phosphor-host-ipmid-586d35b40ec6ac667f19bee3d0258b2cdd3824c2.tar.gz phosphor-host-ipmid-586d35b40ec6ac667f19bee3d0258b2cdd3824c2.zip |
replaced c headers with cpp where applicable
Change-Id: I23a70eb540ccde5d2aba467426769feffb07b516
Signed-off-by: Patrick Venture <venture@google.com>
Diffstat (limited to 'sensordatahandler.hpp')
-rw-r--r-- | sensordatahandler.hpp | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/sensordatahandler.hpp b/sensordatahandler.hpp index 771303d..bcb55ff 100644 --- a/sensordatahandler.hpp +++ b/sensordatahandler.hpp @@ -5,7 +5,8 @@ #include "utils.hpp" #include <host-ipmid/ipmid-api.h> -#include <math.h> + +#include <cmath> namespace ipmi { @@ -193,8 +194,8 @@ GetSensorResponse readingData(const Info& sensorInfo) sensorInfo.propertyInterfaces.begin()->first, sensorInfo.propertyInterfaces.begin()->second.begin()->first); - double value = - propValue.get<T>() * pow(10, sensorInfo.scale - sensorInfo.exponentR); + double value = propValue.get<T>() * + std::pow(10, sensorInfo.scale - sensorInfo.exponentR); auto rawData = static_cast<uint8_t>((value - sensorInfo.scaledOffset) / sensorInfo.coefficientM); @@ -267,7 +268,7 @@ ipmi_ret_t readingData(const SetSensorReadingReq& cmdData, T raw_value = (sensorInfo.coefficientM * cmdData.reading) + sensorInfo.scaledOffset; - raw_value *= pow(10, sensorInfo.exponentR - sensorInfo.scale); + raw_value *= std::pow(10, sensorInfo.exponentR - sensorInfo.scale); auto msg = makeDbusMsg("org.freedesktop.DBus.Properties", sensorInfo.sensorPath, |