From 8a0128a5ca0784f6d2b4ca27907e8967a74bc4c5 Mon Sep 17 00:00:00 2001 From: Andreas Gampe Date: Mon, 28 Nov 2016 07:38:35 -0800 Subject: ART: Add dex::StringIndex Add abstraction for uint32_t string index. Test: m test-art-host Change-Id: I917c2881702fe3df112c713f06980f2278ced7ed --- runtime/string_reference.h | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'runtime/string_reference.h') diff --git a/runtime/string_reference.h b/runtime/string_reference.h index c75c218cd5..0fc06e6389 100644 --- a/runtime/string_reference.h +++ b/runtime/string_reference.h @@ -21,20 +21,22 @@ #include "base/logging.h" #include "dex_file-inl.h" +#include "dex_file_types.h" #include "utf-inl.h" namespace art { // A string is located by its DexFile and the string_ids_ table index into that DexFile. struct StringReference { - StringReference(const DexFile* file, uint32_t index) : dex_file(file), string_index(index) { } + StringReference(const DexFile* file, dex::StringIndex index) + : dex_file(file), string_index(index) { } const char* GetStringData() const { return dex_file->GetStringData(dex_file->GetStringId(string_index)); } const DexFile* dex_file; - uint32_t string_index; + dex::StringIndex string_index; }; // Compare only the reference and not the string contents. -- cgit v1.2.3-59-g8ed1b