clang-15: fixes for boolean simplification
clang-tidy-15 is reporting the following issue:
```
../src/ExternalSensorMain.cpp:227:17: error: boolean expression can be simplified by DeMorgan's theorem [readability-simplify-boolean-expr,-warnings-as-errors]
if (!(std::isfinite(timeoutSecs) && (timeoutSecs >= 0.0)))
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
! || <
```
Apply automatic fix from clang-tidy.
Signed-off-by: Patrick Williams <patrick@stwcx.xyz>
Change-Id: If218521e68dd7b879d7e145bcd78a858f8778052
diff --git a/src/ExternalSensorMain.cpp b/src/ExternalSensorMain.cpp
index 23721a8..a954bcc 100644
--- a/src/ExternalSensorMain.cpp
+++ b/src/ExternalSensorMain.cpp
@@ -224,7 +224,7 @@
timeoutSecs =
std::visit(VariantToDoubleVisitor(), timeoutFound->second);
}
- if (!(std::isfinite(timeoutSecs) && (timeoutSecs >= 0.0)))
+ if (!std::isfinite(timeoutSecs) || (timeoutSecs < 0.0))
{
std::cerr << "Timeout parameter not parsed for "
<< interfacePath << "\n";