clang-tidy: Enable readability-simplify-boolean-expr check

This checks for boolean expressions involving boolean constants
and simplifies them to use the appropriate boolean expression
directly.

Change-Id: I4ad7ec4ddfa4cfe9a0cf0d569d3d81c478c1776a
Signed-off-by: Pavithra Barithaya <pavithrabarithaya07@gmail.com>
diff --git a/.clang-tidy b/.clang-tidy
index d6d2a4c..a5f42b6 100644
--- a/.clang-tidy
+++ b/.clang-tidy
@@ -261,6 +261,7 @@
 readability-redundant-preprocessor,
 readability-redundant-smartptr-get,
 readability-redundant-string-init,
+readability-simplify-boolean-expr,
 readability-simplify-subscript-expr,
 readability-static-accessed-through-instance,
 readability-static-definition-in-anonymous-namespace,
diff --git a/chassis_state_manager.cpp b/chassis_state_manager.cpp
index 189f2de..05cc784 100644
--- a/chassis_state_manager.cpp
+++ b/chassis_state_manager.cpp
@@ -280,7 +280,7 @@
                     continue;
                 }
 
-                if (std::get<bool>(properties["IsPresent"]) != true)
+                if (!std::get<bool>(properties["IsPresent"]))
                 {
                     // There is a UPS detected but it is not officially
                     // "present" yet. Monitor it for state change.
diff --git a/host_condition_gpio/host_condition.cpp b/host_condition_gpio/host_condition.cpp
index d0e4615..9a48c6a 100644
--- a/host_condition_gpio/host_condition.cpp
+++ b/host_condition_gpio/host_condition.cpp
@@ -49,10 +49,9 @@
         {
             int32_t gpioVal = 0;
 
-            line.request({lineName, gpiod::line_request::DIRECTION_INPUT,
-                          (true == isActHigh)
-                              ? 0
-                              : gpiod::line_request::FLAG_ACTIVE_LOW});
+            line.request(
+                {lineName, gpiod::line_request::DIRECTION_INPUT,
+                 (isActHigh) ? 0 : gpiod::line_request::FLAG_ACTIVE_LOW});
 
             gpioVal = line.get_value();
             line.release();
diff --git a/utils.cpp b/utils.cpp
index e4f7121..0df843b 100644
--- a/utils.cpp
+++ b/utils.cpp
@@ -233,12 +233,7 @@
                                                       chassisId);
 
     std::filesystem::path chassisPowerLossFile{chassisLostPowerFileFmt};
-    if (std::filesystem::exists(chassisPowerLossFile))
-    {
-        return true;
-    }
-
-    return false;
+    return std::filesystem::exists(chassisPowerLossFile);
 }
 
 bool isBmcReady(sdbusplus::bus_t& bus)