Fix clang-tidy performance warnings.
* Use const reference parameter type to avoid unnecessary copy.
* Use more efficient overloaded string methods.
Bug: 30407689
Bug: 30411878
Change-Id: Iefab05c077367f272abf545036b853e8a295c8cd
Test: build with WITH_TIDY=1
diff --git a/recovery-refresh.cpp b/recovery-refresh.cpp
index 333367e..b75c915 100644
--- a/recovery-refresh.cpp
+++ b/recovery-refresh.cpp
@@ -76,7 +76,7 @@
}
std::string name(filename);
- size_t dot = name.find_last_of(".");
+ size_t dot = name.find_last_of('.');
std::string sub = name.substr(0, dot);
if (!strstr(LAST_KMSG_FILE, sub.c_str()) &&