clang-tidy: Enable readability-implicit-bool-conversion check
This check can be used to find implicit conversions between
built-in types and booleans.
the following conversion types are checked:
- integer expression/literal to boolean
- floating expression/literal to boolean
- pointer/pointer to member/nullptr/NULL to boolean
- boolean expression/literal to integer
- boolean expression/literal to floating
Signed-off-by: George Liu <liuxiwei@ieisystem.com>
Change-Id: I3f4bc8902e255d1c85ec57f47d9532ee7326a442
diff --git a/manager/lamptest/lamptest.cpp b/manager/lamptest/lamptest.cpp
index f91a085..f7f9e90 100644
--- a/manager/lamptest/lamptest.cpp
+++ b/manager/lamptest/lamptest.cpp
@@ -246,7 +246,7 @@
void LampTest::timeOutHandler()
{
// set the Asserted property of lamp test to false
- if (!groupObj)
+ if (groupObj == nullptr)
{
lg2::error("the Group object is nullptr");
throw std::runtime_error("the Group object is nullptr");