summaryrefslogtreecommitdiff
path: root/runtime/dex_file.cc
diff options
context:
space:
mode:
author Mathieu Chartier <mathieuc@google.com> 2015-10-29 22:33:20 +0000
committer android-build-merger <android-build-merger@google.com> 2015-10-29 22:33:20 +0000
commitc7534d1f650a9179e204c16a2ac5b16f7257cd5c (patch)
treef8facbd68dabc781cc4f8e76353a418ef633896e /runtime/dex_file.cc
parentb8f6d7c3360180174276bab7618760724500d148 (diff)
parent8cb0bc28b1161dad0d2c2c1e75318b7e504faa46 (diff)
Merge "Change a few places to use string version of GetTypeId"
am: 8cb0bc28b1 * commit '8cb0bc28b1161dad0d2c2c1e75318b7e504faa46': Change a few places to use string version of GetTypeId
Diffstat (limited to 'runtime/dex_file.cc')
-rw-r--r--runtime/dex_file.cc6
1 files changed, 1 insertions, 5 deletions
diff --git a/runtime/dex_file.cc b/runtime/dex_file.cc
index b3ca6ac131..3a93aace83 100644
--- a/runtime/dex_file.cc
+++ b/runtime/dex_file.cc
@@ -738,11 +738,7 @@ bool DexFile::CreateTypeList(const StringPiece& signature, uint16_t* return_type
}
// TODO: avoid creating a std::string just to get a 0-terminated char array
std::string descriptor(signature.data() + start_offset, offset - start_offset);
- const DexFile::StringId* string_id = FindStringId(descriptor.c_str());
- if (string_id == nullptr) {
- return false;
- }
- const DexFile::TypeId* type_id = FindTypeId(GetIndexForStringId(*string_id));
+ const DexFile::TypeId* type_id = FindTypeId(descriptor.c_str());
if (type_id == nullptr) {
return false;
}