Enable readability-container-size-empty tests
This one is a little trivial, but it does help in readability.
Signed-off-by: Ed Tanous <edtanous@google.com>
Change-Id: I5366d4eec8af2f781b3bad804131ae2eb806e3aa
diff --git a/redfish-core/lib/pcie.hpp b/redfish-core/lib/pcie.hpp
index 78fa669..10655bf 100644
--- a/redfish-core/lib/pcie.hpp
+++ b/redfish-core/lib/pcie.hpp
@@ -217,7 +217,7 @@
messages::internalError(asyncResp->res);
return;
}
- if (*generationInUse == "")
+ if (generationInUse->empty())
{
// unknown, no need to handle
return;
@@ -303,7 +303,7 @@
"DeviceId";
std::string* property = std::get_if<std::string>(
&pcieDevProperties[devIDProperty]);
- if (property && !property->empty())
+ if (property != nullptr && !property->empty())
{
pcieFunctionList.push_back(
{{"@odata.id",
@@ -365,7 +365,7 @@
"Function" + function + "DeviceId";
if (std::string* property = std::get_if<std::string>(
&pcieDevProperties[devIDProperty]);
- property && property->empty())
+ property != nullptr && property->empty())
{
messages::resourceNotFound(asyncResp->res,
"PCIeFunction", function);