Remove unused length from DexFile GetString calls.
Address extra review comments from commit
dfb325e0ddd746cd8f7c2e3723b3a573eb7cc111.
Change-Id: If76e81e7af5870431901de0bf561e0f827435fe3
diff --git a/runtime/dex_file.h b/runtime/dex_file.h
index 7901ea7..a9c24e6 100644
--- a/runtime/dex_file.h
+++ b/runtime/dex_file.h
@@ -575,6 +575,7 @@
return StringDataByIdx(GetProtoId(method_id.proto_idx_).shorty_idx_);
}
const char* GetMethodShorty(const MethodId& method_id, uint32_t* length) const {
+ // Using the UTF16 length is safe here as shorties are guaranteed to be ASCII characters.
return StringDataAndUtf16LengthByIdx(GetProtoId(method_id.proto_idx_).shorty_idx_, length);
}
// Returns the number of class definitions in the .dex file.