diff options
-rw-r--r-- | .clang-tidy | 1 | ||||
-rw-r--r-- | redfish-core/lib/sensors.hpp | 2 |
2 files changed, 2 insertions, 1 deletions
diff --git a/.clang-tidy b/.clang-tidy index 308c3f9be6..ffa6589dd1 100644 --- a/.clang-tidy +++ b/.clang-tidy @@ -280,6 +280,7 @@ performance-unnecessary-value-param, readability-avoid-const-params-in-decls, readability-braces-around-statements, readability-const-return-type, +readability-container-contains, readability-container-data-pointer, readability-container-size-empty, readability-convert-member-functions-to-static, diff --git a/redfish-core/lib/sensors.hpp b/redfish-core/lib/sensors.hpp index b5d0127777..1fec8680c0 100644 --- a/redfish-core/lib/sensors.hpp +++ b/redfish-core/lib/sensors.hpp @@ -1230,7 +1230,7 @@ inline InventoryItem* findInventoryItemForSensor( { for (InventoryItem& inventoryItem : *inventoryItems) { - if (inventoryItem.sensors.count(sensorObjPath) > 0) + if (inventoryItem.sensors.contains(sensorObjPath)) { return &inventoryItem; } |