summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author Andreas Gampe <agampe@google.com> 2018-09-06 13:46:51 -0700
committer Andreas Gampe <agampe@google.com> 2018-09-06 13:46:51 -0700
commit454a5c248135d94d32dd7d38b21e742661e57d67 (patch)
tree142f9adca90442b28036aba46bb5a38cd41d9a38
parent3e7f66b137139fa29a38d3de9e3c532a37269caa (diff)
ART: Fix tidy warning in patchoat
Fix performance-faster-string-find. Bug: 32619234 Test: mmma art Change-Id: I59c25232af69c66d5b94abc9dd5f53bfa82a36ba
-rw-r--r--patchoat/patchoat.cc2
1 files changed, 1 insertions, 1 deletions
diff --git a/patchoat/patchoat.cc b/patchoat/patchoat.cc
index aaa3e8339f..460e4e05f4 100644
--- a/patchoat/patchoat.cc
+++ b/patchoat/patchoat.cc
@@ -630,7 +630,7 @@ bool PatchOat::Patch(const std::string& image_location,
std::string image_relocation_filename =
output_image_relocation_directory
+ (android::base::StartsWith(original_image_filename, "/") ? "" : "/")
- + original_image_filename.substr(original_image_filename.find_last_of("/"));
+ + original_image_filename.substr(original_image_filename.find_last_of('/'));
int64_t input_image_size = input_image->GetLength();
if (input_image_size < 0) {
LOG(ERROR) << "Error while getting input image size";