diff options
author | Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com> | 2020-02-12 00:53:37 +0000 |
---|---|---|
committer | Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com> | 2020-02-12 00:53:37 +0000 |
commit | 0b49886dca66d48c4fdf60fdb4beb2c7b51d10ea (patch) | |
tree | c8da669a4aa38149165b1b6976f1ed5b5fb56e09 /startop | |
parent | 5040954f68b17f34ba90ecc427f1b9d2aefb1b96 (diff) | |
parent | 40ef6319ca56bda8f1b4719b4e8a1f8ae24e229f (diff) |
Merge "Fix clang-tidy performance-faster-string-find warnings" am: 57fb318ca3 am: 7c0f0d3cec am: 40ef6319ca
Change-Id: Id9d31a0c5cf41a0bb4a58326faa79511a1d8cc4a
Diffstat (limited to 'startop')
-rw-r--r-- | startop/view_compiler/dex_layout_compiler.cc | 4 | ||||
-rw-r--r-- | startop/view_compiler/util.cc | 4 |
2 files changed, 4 insertions, 4 deletions
diff --git a/startop/view_compiler/dex_layout_compiler.cc b/startop/view_compiler/dex_layout_compiler.cc index cb820f8f20fb..bddb8aa6716a 100644 --- a/startop/view_compiler/dex_layout_compiler.cc +++ b/startop/view_compiler/dex_layout_compiler.cc @@ -118,7 +118,7 @@ namespace { std::string ResolveName(const std::string& name) { if (name == "View") return "android.view.View"; if (name == "ViewGroup") return "android.view.ViewGroup"; - if (name.find(".") == std::string::npos) { + if (name.find('.') == std::string::npos) { return StringPrintf("android.widget.%s", name.c_str()); } return name; @@ -205,4 +205,4 @@ void DexViewBuilder::PopViewStack() { view_stack_.pop_back(); } -} // namespace startop
\ No newline at end of file +} // namespace startop 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); } |