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/account_service.hpp b/redfish-core/lib/account_service.hpp
index 53d644d..0bf03cc 100644
--- a/redfish-core/lib/account_service.hpp
+++ b/redfish-core/lib/account_service.hpp
@@ -88,7 +88,7 @@
{
return "Operator";
}
- if ((role == "") || (role == "priv-noaccess"))
+ if (role.empty() || (role == "priv-noaccess"))
{
return "NoAccess";
}
@@ -108,7 +108,7 @@
{
return "priv-operator";
}
- if ((role == "NoAccess") || (role == ""))
+ if ((role == "NoAccess") || (role.empty()))
{
return "priv-noaccess";
}
@@ -1029,7 +1029,7 @@
}
if (serviceAddressList)
{
- if ((*serviceAddressList).size() == 0)
+ if (serviceAddressList->empty())
{
messages::propertyValueNotInList(asyncResp->res, "[]",
"ServiceAddress");
@@ -1038,7 +1038,7 @@
}
if (baseDNList)
{
- if ((*baseDNList).size() == 0)
+ if (baseDNList->empty())
{
messages::propertyValueNotInList(asyncResp->res, "[]",
"BaseDistinguishedNames");