clang-tidy: Enable performance-faster-string-find check
Optimize calls to std::string::find() and friends when the needle
passed is a single character string literal. The character literal
overload is more efficient.
Signed-off-by: George Liu <liuxiwei@ieisystem.com>
Change-Id: I7cfc50410d6b6c9057995df8db47084445119d7b
diff --git a/fault-monitor/fru-fault-monitor.cpp b/fault-monitor/fru-fault-monitor.cpp
index 6cb5b8a..cf64862 100644
--- a/fault-monitor/fru-fault-monitor.cpp
+++ b/fault-monitor/fru-fault-monitor.cpp
@@ -91,7 +91,7 @@
return;
}
- auto pos = path.rfind("/");
+ auto pos = path.rfind('/');
if (pos == std::string::npos)
{
using namespace xyz::openbmc_project::Common;