diff options
| author | 2016-11-28 07:38:35 -0800 | |
|---|---|---|
| committer | 2016-11-29 11:11:46 -0800 | |
| commit | 8a0128a5ca0784f6d2b4ca27907e8967a74bc4c5 (patch) | |
| tree | 0dec75200282ae5e49785395e97bd4e6459f1c09 /runtime/string_reference.h | |
| parent | 60438b46090d22bb9b978196f5aa53fab3b89759 (diff) | |
ART: Add dex::StringIndex
Add abstraction for uint32_t string index.
Test: m test-art-host
Change-Id: I917c2881702fe3df112c713f06980f2278ced7ed
Diffstat (limited to 'runtime/string_reference.h')
| -rw-r--r-- | runtime/string_reference.h | 6 |
1 files changed, 4 insertions, 2 deletions
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. |