diff options
author | Mathieu Chartier <mathieuc@google.com> | 2014-06-06 23:37:27 +0000 |
---|---|---|
committer | Gerrit Code Review <noreply-gerritcodereview@google.com> | 2014-06-06 23:37:27 +0000 |
commit | 4479ba35389b03ccc9eabd17fba6168f9505517a (patch) | |
tree | fb8091b4637b27d8a9d3d4f390b79263a12d9881 /runtime/mirror/class.cc | |
parent | 081203e06534e4aa27a942e47084289eecab29ed (diff) | |
parent | 61c5ebc6aee2cac1c363de6fbdac25ada1697fdb (diff) | |
download | art-4479ba35389b03ccc9eabd17fba6168f9505517a.zip art-4479ba35389b03ccc9eabd17fba6168f9505517a.tar.gz art-4479ba35389b03ccc9eabd17fba6168f9505517a.tar.bz2 |
Merge "Change FieldHelper to use a handle."
Diffstat (limited to 'runtime/mirror/class.cc')
-rw-r--r-- | runtime/mirror/class.cc | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/runtime/mirror/class.cc b/runtime/mirror/class.cc index 42ef68a..a409093 100644 --- a/runtime/mirror/class.cc +++ b/runtime/mirror/class.cc @@ -517,11 +517,9 @@ ArtMethod* Class::FindClassInitializer() { ArtField* Class::FindDeclaredInstanceField(const StringPiece& name, const StringPiece& type) { // Is the field in this class? // Interfaces are not relevant because they can't contain instance fields. - FieldHelper fh; for (size_t i = 0; i < NumInstanceFields(); ++i) { ArtField* f = GetInstanceField(i); - fh.ChangeField(f); - if (name == fh.GetName() && type == fh.GetTypeDescriptor()) { + if (name == f->GetName() && type == f->GetTypeDescriptor()) { return f; } } @@ -566,11 +564,9 @@ ArtField* Class::FindInstanceField(const DexCache* dex_cache, uint32_t dex_field ArtField* Class::FindDeclaredStaticField(const StringPiece& name, const StringPiece& type) { DCHECK(type != NULL); - FieldHelper fh; for (size_t i = 0; i < NumStaticFields(); ++i) { ArtField* f = GetStaticField(i); - fh.ChangeField(f); - if (name == fh.GetName() && type == fh.GetTypeDescriptor()) { + if (name == f->GetName() && type == f->GetTypeDescriptor()) { return f; } } |