clang-tidy: Enable readability-string-compare check
This check finds string comparisons using the compare method.
A common mistake is to use the string’s compare method instead of
using the equality or inequality operators.
Change-Id: I261afa51d6af1db5afb94a127f45df7544911af9
Signed-off-by: Pavithra Barithaya <pavithrabarithaya07@gmail.com>
diff --git a/item_updater.cpp b/item_updater.cpp
index 43c4c8b..fd51adb 100644
--- a/item_updater.cpp
+++ b/item_updater.cpp
@@ -685,7 +685,7 @@
{
for (auto iter = assocs.begin(); iter != assocs.end();)
{
- if ((std::get<2>(*iter)).compare(path) == 0)
+ if (std::get<2>(*iter) == path)
{
iter = assocs.erase(iter);
associations(assocs);