summaryrefslogtreecommitdiff
path: root/patchoat/patchoat_test.cc
diff options
context:
space:
mode:
author Andreas Gampe <agampe@google.com> 2018-09-18 16:00:19 -0700
committer Andreas Gampe <agampe@google.com> 2018-09-18 16:01:22 -0700
commit157f9401baf3c0dcf4509c53e556556d9158ba1d (patch)
treeb450eb25239e89b56b4c38abf0b451df53b8a4c1 /patchoat/patchoat_test.cc
parentaad9d372b3c63f4052d4a1b986a151ea0a96d393 (diff)
ART: Fix tidy warnings in patchoat (again)
Fix performance-faster-string-find warning. Bug: 32619234 Test: WITH_TIDY=1 mmma art/patchoat Change-Id: Ic8678d140cd8aa9b5c26bcbc48d3e4e326d4e56f
Diffstat (limited to 'patchoat/patchoat_test.cc')
-rw-r--r--patchoat/patchoat_test.cc10
1 files changed, 5 insertions, 5 deletions
diff --git a/patchoat/patchoat_test.cc b/patchoat/patchoat_test.cc
index 6492b96b34..79ae9872ba 100644
--- a/patchoat/patchoat_test.cc
+++ b/patchoat/patchoat_test.cc
@@ -405,7 +405,7 @@ TEST_F(PatchoatTest, PatchoatRelocationSameAsDex2oatRelocation) {
std::vector<std::string> patchoat_image_shortened_basenames(patchoat_image_basenames.size());
for (size_t i = 0; i < patchoat_image_basenames.size(); i++) {
patchoat_image_shortened_basenames[i] =
- patchoat_image_basenames[i].substr(patchoat_image_basenames[i].find_last_of("@") + 1);
+ patchoat_image_basenames[i].substr(patchoat_image_basenames[i].find_last_of('@') + 1);
}
ASSERT_EQ(dex2oat_image_basenames, patchoat_image_shortened_basenames);
@@ -515,16 +515,16 @@ class PatchoatVerificationTest : public PatchoatTest {
std::vector<std::string> rel_shortened_basenames(rel_basenames.size());
std::vector<std::string> relocated_image_shortened_basenames(relocated_image_basenames.size());
for (size_t i = 0; i < rel_basenames.size(); i++) {
- rel_shortened_basenames[i] = rel_basenames[i].substr(rel_basenames[i].find_last_of("@") + 1);
+ rel_shortened_basenames[i] = rel_basenames[i].substr(rel_basenames[i].find_last_of('@') + 1);
rel_shortened_basenames[i] =
- rel_shortened_basenames[i].substr(0, rel_shortened_basenames[i].find("."));
+ rel_shortened_basenames[i].substr(0, rel_shortened_basenames[i].find('.'));
}
for (size_t i = 0; i < relocated_image_basenames.size(); i++) {
relocated_image_shortened_basenames[i] =
- relocated_image_basenames[i].substr(relocated_image_basenames[i].find_last_of("@") + 1);
+ relocated_image_basenames[i].substr(relocated_image_basenames[i].find_last_of('@') + 1);
relocated_image_shortened_basenames[i] =
relocated_image_shortened_basenames[i].substr(
- 0, relocated_image_shortened_basenames[i].find("."));
+ 0, relocated_image_shortened_basenames[i].find('.'));
}
ASSERT_EQ(rel_shortened_basenames, relocated_image_shortened_basenames);
}