Fix tidy build

This appears to be something tidy is wrong about.  The suggestion of
adding math to the struct initializers appears to not compile.

Move the calculation of hysteresisTrigger and hysteresisPublish into the
constructor body itself to avoid the warning.

Change-Id: I833fd12966c69c0e081692d6d40ba0cf1805ead1
Signed-off-by: Ed Tanous <etanous@nvidia.com>
diff --git a/src/sensor.hpp b/src/sensor.hpp
index 07d70ec..b21df1e 100644
--- a/src/sensor.hpp
+++ b/src/sensor.hpp
@@ -78,13 +78,18 @@
         configInterface(configInterfaceName(objectType)),
         isSensorSettable(isSettable), isValueMutable(isMutable), maxValue(max),
         minValue(min), thresholds(std::move(thresholdData)),
-        hysteresisTrigger((max - min) * 0.01),
-        hysteresisPublish((max - min) * 0.0001), dbusConnection(conn),
-        readState(readState),
+        dbusConnection(conn), readState(readState),
         instrumentation(enableInstrumentation
                             ? std::make_unique<SensorInstrumentation>()
                             : nullptr)
-    {}
+    {
+        // These inits confuse tidy because they're doing constructor params
+        // math on member variables that tidy suggests should be default
+        // initialized. NOLINTBEGIN(cppcoreguidelines-prefer-member-initializer)
+        hysteresisTrigger = (max - min) * 0.01;
+        hysteresisPublish = (max - min) * 0.0001;
+        // NOLINTEND(cppcoreguidelines-prefer-member-initializer)
+    }
     virtual ~Sensor() = default;
     virtual void checkThresholds() = 0;
     std::string name;
@@ -110,8 +115,8 @@
     double rawValue = std::numeric_limits<double>::quiet_NaN();
     bool overriddenState = false;
     bool internalSet = false;
-    double hysteresisTrigger;
-    double hysteresisPublish;
+    double hysteresisTrigger = 1.0;
+    double hysteresisPublish = 1.0;
     std::shared_ptr<sdbusplus::asio::connection> dbusConnection;
     PowerState readState;
     size_t errCount{0};