diff options
author | Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com> | 2020-02-12 00:39:15 +0000 |
---|---|---|
committer | Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com> | 2020-02-12 00:39:15 +0000 |
commit | 40ef6319ca56bda8f1b4719b4e8a1f8ae24e229f (patch) | |
tree | 343c79022fb83c0f6631b5db7eab2be3dc12dcfa /startop/view_compiler/util.cc | |
parent | 2593e104d5cf829b2aa7a715530bebd63b3dc991 (diff) | |
parent | 7c0f0d3cecc59443d2aaab079e44e9630f732eab (diff) |
Merge "Fix clang-tidy performance-faster-string-find warnings" am: 57fb318ca3 am: 7c0f0d3cec
Change-Id: I181488a9d4c5aed3f62cf497ae6d092fcf27e7f6
Diffstat (limited to 'startop/view_compiler/util.cc')
-rw-r--r-- | startop/view_compiler/util.cc | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/startop/view_compiler/util.cc b/startop/view_compiler/util.cc index a0637e6da32f..c34d7b059cfc 100644 --- a/startop/view_compiler/util.cc +++ b/startop/view_compiler/util.cc @@ -23,13 +23,13 @@ namespace util { // TODO: see if we can borrow this from somewhere else, like aapt2. string FindLayoutNameFromFilename(const string& filename) { - size_t start = filename.rfind("/"); + size_t start = filename.rfind('/'); if (start == string::npos) { start = 0; } else { start++; // advance past '/' character } - size_t end = filename.find(".", start); + size_t end = filename.find('.', start); return filename.substr(start, end - start); } |