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/PSUSensorMain.cpp b/src/PSUSensorMain.cpp
index 16c601d..c710b4d 100644
--- a/src/PSUSensorMain.cpp
+++ b/src/PSUSensorMain.cpp
@@ -553,7 +553,7 @@
std::string labelHead;
std::string sensorPathStr = sensorPath.string();
std::string sensorNameStr = sensorPath.filename();
- std::string sensorNameSubStr{""};
+ std::string sensorNameSubStr;
if (std::regex_search(sensorNameStr, matches, sensorNameRegEx))
{
// hwmon *_input filename without number:
@@ -575,7 +575,7 @@
{
std::string sensorPathStrMax = sensorPathStr.substr(pos);
- if (sensorPathStrMax.compare("_max") == 0)
+ if (sensorPathStrMax == "_max")
{
labelPath =
boost::replace_all_copy(sensorPathStr, "max", "label");
@@ -941,8 +941,7 @@
{
std::cerr << "Created total of " << numCreated << " sensors\n";
}
- return;
-}
+ }
void createSensors(
boost::asio::io_service& io, sdbusplus::asio::object_server& objectServer,