Merge "Fix clang-tidy performance-faster-string-find warnings"
diff --git a/simpleperf/event_type.cpp b/simpleperf/event_type.cpp
index c9eaa75..71c3d9f 100644
--- a/simpleperf/event_type.cpp
+++ b/simpleperf/event_type.cpp
@@ -161,7 +161,7 @@
   //   # cat armv8_pmuv3/events/cpu_cycles
   //   event=0x011
   for (auto& s : android::base::Split(event_str, ",")) {
-    auto pos = s.find("=");
+    auto pos = s.find('=');
     if (pos == std::string::npos)
       continue;
 
@@ -229,7 +229,7 @@
   if (!IsPmuEvent())
     return empty_result;
 
-  std::string pmu = name.substr(0, name.find("/"));
+  std::string pmu = name.substr(0, name.find('/'));
   std::string cpumask_path = "/sys/bus/event_source/devices/" + pmu + "/cpumask";
   std::string cpumask_content;
   if (!android::base::ReadFileToString(cpumask_path, &cpumask_content)) {
diff --git a/simpleperf/event_type.h b/simpleperf/event_type.h
index d4ffecb..359438e 100644
--- a/simpleperf/event_type.h
+++ b/simpleperf/event_type.h
@@ -44,7 +44,7 @@
   }
 
   bool IsPmuEvent() const {
-    return name.find("/") != std::string::npos;
+    return name.find('/') != std::string::npos;
   }
 
   std::vector<int> GetPmuCpumask();