Clang-tidy-14 fixes
Do as the robot commands. All changes made automatically by tidy.
Tested: (Thanks Zhikui)
Downloaded and run on system. Sensors scan normally.
Signed-off-by: Ed Tanous <edtanous@google.com>
Change-Id: I752f37c9e7a95aa3be8e6980ba6e4b2b48b3395a
diff --git a/src/MCUTempSensor.cpp b/src/MCUTempSensor.cpp
index c8aef67..68b6df3 100644
--- a/src/MCUTempSensor.cpp
+++ b/src/MCUTempSensor.cpp
@@ -99,7 +99,7 @@
thresholds::checkThresholds(this);
}
-int MCUTempSensor::getMCURegsInfoWord(uint8_t regs, int16_t* pu16data)
+int MCUTempSensor::getMCURegsInfoWord(uint8_t regs, int16_t* pu16data) const
{
std::string i2cBus = "/dev/i2c-" + std::to_string(busId);
@@ -129,7 +129,7 @@
return -1;
}
- if (!(funcs & I2C_FUNC_SMBUS_READ_WORD_DATA))
+ if ((funcs & I2C_FUNC_SMBUS_READ_WORD_DATA) == 0U)
{
std::cerr << " not support I2C_FUNC_SMBUS_READ_WORD_DATA\n";
close(fd);