summaryrefslogtreecommitdiff
path: root/tools/aapt2/dump
diff options
context:
space:
mode:
author Chih-Hung Hsieh <chh@google.com> 2020-02-11 14:27:11 -0800
committer Chih-Hung Hsieh <chh@google.com> 2020-02-11 14:27:11 -0800
commitf2ef6579f2fe70ddca7fa3d443b3780d0264eb88 (patch)
tree831808e5fd62fe0f303c25fd3e509951cce0f2e8 /tools/aapt2/dump
parent668daf03416525dbcd96f2a06b2fd5dccb7cec13 (diff)
Fix clang-tidy performance-faster-string-find warnings
Bug: 30411878 Test: build with WITH_TIDY=1 Change-Id: I7fd815aa401fbcaff97b772f3ba5d6f1d2034011
Diffstat (limited to 'tools/aapt2/dump')
-rw-r--r--tools/aapt2/dump/DumpManifest.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/tools/aapt2/dump/DumpManifest.cpp b/tools/aapt2/dump/DumpManifest.cpp
index 92f1ddb292e1..42a64716701d 100644
--- a/tools/aapt2/dump/DumpManifest.cpp
+++ b/tools/aapt2/dump/DumpManifest.cpp
@@ -1175,7 +1175,7 @@ class Activity : public ManifestExtractor::Element {
}
// Fully qualify the activity name
- ssize_t idx = name.find(".");
+ ssize_t idx = name.find('.');
if (idx == 0) {
name = package + name;
} else if (idx < 0) {
@@ -2125,7 +2125,7 @@ bool ManifestExtractor::Dump(text::Printer* printer, IDiagnostics* diag) {
size_t pos = file_path.find("lib/");
if (pos != std::string::npos) {
file_path = file_path.substr(pos + 4);
- pos = file_path.find("/");
+ pos = file_path.find('/');
if (pos != std::string::npos) {
file_path = file_path.substr(0, pos);
}