summaryrefslogtreecommitdiff
path: root/preopt2cachename
diff options
context:
space:
mode:
authorChih-Hung Hsieh <chh@google.com>2018-09-17 15:23:47 -0700
committerChih-Hung Hsieh <chh@google.com>2018-09-17 15:23:47 -0700
commitad807707bbc2b10a2aaea1c6f75ef9a0911d3539 (patch)
treef64ccc902f8d0c22b3e8848db86ec9accd1304f6 /preopt2cachename
parenta88a7d23c0db10d42e0116c7595528c774a6a476 (diff)
downloadextras-ad807707bbc2b10a2aaea1c6f75ef9a0911d3539.tar.gz
Fix clang-tidy performance warnings in system/extra.
* Use more efficient overloaded string methods. Bug: 30411878 Test: build with WITH_TIDY=1 Change-Id: If1a2931cab7f70e4a4bd5fcc06b2ae0260169cd8
Diffstat (limited to 'preopt2cachename')
-rw-r--r--preopt2cachename/preopt2cachename.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/preopt2cachename/preopt2cachename.cpp b/preopt2cachename/preopt2cachename.cpp
index 3fb887be..40d66b14 100644
--- a/preopt2cachename/preopt2cachename.cpp
+++ b/preopt2cachename/preopt2cachename.cpp
@@ -89,7 +89,7 @@ static bool SystemBFilenameToCacheFile(const std::string& file_location,
LOG(ERROR) << "Unable to determine apk name from file name '" << file_location << "'";
return false;
}
- std::string::size_type pos = file_location.find_last_of(".");
+ std::string::size_type pos = file_location.find_last_of('.');
if (pos == std::string::npos) {
LOG(ERROR) << "Invalid file location '" << file_location << "'";
return false;