clang-tidy: Enable readability-string-compare check
Finds string comparisons using the compare method.
Signed-off-by: George Liu <liuxiwei@ieisystem.com>
Change-Id: I78c904bca4724e84aa3999d9f34ed66b567af984
diff --git a/fault-monitor/fru-fault-monitor.cpp b/fault-monitor/fru-fault-monitor.cpp
index cf64862..e67ffb4 100644
--- a/fault-monitor/fru-fault-monitor.cpp
+++ b/fault-monitor/fru-fault-monitor.cpp
@@ -167,7 +167,7 @@
for (const auto& item : assocs)
{
- if (std::get<1>(item).compare(CALLOUT_REV_ASSOCIATION) == 0)
+ if (std::get<1>(item) == CALLOUT_REV_ASSOCIATION)
{
removeWatches.emplace_back(
std::make_unique<Remove>(bus, std::get<2>(item)));
@@ -242,7 +242,7 @@
for (const auto& item : assocs)
{
- if (std::get<1>(item).compare(CALLOUT_REV_ASSOCIATION) == 0)
+ if (std::get<1>(item) == CALLOUT_REV_ASSOCIATION)
{
removeWatches.emplace_back(
std::make_unique<Remove>(bus, std::get<2>(item)));