Enable readability-implicit-bool-conversion checks
These checks ensure that we're not implicitly converting ints or
pointers into bools, which makes the code easier to read.
Tested:
Ran series through redfish service validator. No changes observed.
UUID failing in Qemu both before and after.
Signed-off-by: Ed Tanous <edtanous@google.com>
Change-Id: I1ca0be980d136bd4e5474341f4fd62f2f6bbdbae
diff --git a/redfish-core/lib/managers.hpp b/redfish-core/lib/managers.hpp
index c69af7e..549ab2d 100644
--- a/redfish-core/lib/managers.hpp
+++ b/redfish-core/lib/managers.hpp
@@ -500,7 +500,7 @@
{
values = ptr;
}
- if (keys && values)
+ if (keys != nullptr && values != nullptr)
{
if (keys->size() != values->size())
{
@@ -913,7 +913,7 @@
return CreatePIDRet::fail;
}
if (chassis.empty() &&
- !findChassis(managedObj, zonesStr[0], chassis))
+ findChassis(managedObj, zonesStr[0], chassis) == nullptr)
{
BMCWEB_LOG_ERROR << "Failed to get chassis from config patch";
messages::invalidObject(response->res, it.key());
@@ -1078,7 +1078,7 @@
return CreatePIDRet::fail;
}
if (chassis.empty() &&
- !findChassis(managedObj, zonesStrs[0], chassis))
+ findChassis(managedObj, zonesStrs[0], chassis) == nullptr)
{
BMCWEB_LOG_ERROR << "Failed to get chassis from config patch";
messages::invalidObject(response->res, it.key());