diff options
author | 2016-07-26 09:02:02 -0700 | |
---|---|---|
committer | 2016-08-01 18:54:48 -0700 | |
commit | 542451cc546779f5c67840e105c51205a1b0a8fd (patch) | |
tree | 11e09bb5abaee12dddffefbe7e425291076dfa7a /runtime/native_bridge_art_interface.cc | |
parent | 85c4a4b8c9eabfe16e4e49f9b4aa78c1bf4be023 (diff) |
ART: Convert pointer size to enum
Move away from size_t to dedicated enum (class).
Bug: 30373134
Bug: 30419309
Test: m test-art-host
Change-Id: Id453c330f1065012e7d4f9fc24ac477cc9bb9269
Diffstat (limited to 'runtime/native_bridge_art_interface.cc')
-rw-r--r-- | runtime/native_bridge_art_interface.cc | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/runtime/native_bridge_art_interface.cc b/runtime/native_bridge_art_interface.cc index 61a1085c0e..155c008e85 100644 --- a/runtime/native_bridge_art_interface.cc +++ b/runtime/native_bridge_art_interface.cc @@ -21,6 +21,7 @@ #include "nativebridge/native_bridge.h" #include "art_method-inl.h" +#include "base/enums.h" #include "base/logging.h" #include "base/macros.h" #include "dex_file-inl.h" @@ -45,7 +46,7 @@ static uint32_t GetNativeMethodCount(JNIEnv* env, jclass clazz) { mirror::Class* c = soa.Decode<mirror::Class*>(clazz); uint32_t native_method_count = 0; - for (auto& m : c->GetMethods(sizeof(void*))) { + for (auto& m : c->GetMethods(kRuntimePointerSize)) { native_method_count += m.IsNative() ? 1u : 0u; } return native_method_count; @@ -60,7 +61,7 @@ static uint32_t GetNativeMethods(JNIEnv* env, jclass clazz, JNINativeMethod* met mirror::Class* c = soa.Decode<mirror::Class*>(clazz); uint32_t count = 0; - for (auto& m : c->GetMethods(sizeof(void*))) { + for (auto& m : c->GetMethods(kRuntimePointerSize)) { if (m.IsNative()) { if (count < method_count) { methods[count].name = m.GetName(); |