diff options
Diffstat (limited to 'runtime/dex_file.h')
-rw-r--r-- | runtime/dex_file.h | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/runtime/dex_file.h b/runtime/dex_file.h index d7ea7459f1..53e1f9ed96 100644 --- a/runtime/dex_file.h +++ b/runtime/dex_file.h @@ -853,14 +853,18 @@ class DexFile { : reinterpret_cast<const AnnotationSetRefList*>(begin_ + offset); } - const AnnotationItem* GetAnnotationItem(const AnnotationSetItem* set_item, uint32_t index) const { - DCHECK_LE(index, set_item->size_); - uint32_t offset = set_item->entries_[index]; + ALWAYS_INLINE const AnnotationItem* GetAnnotationItemAtOffset(uint32_t offset) const { + DCHECK_LE(offset, Size()); return (offset == 0) ? nullptr : reinterpret_cast<const AnnotationItem*>(begin_ + offset); } + const AnnotationItem* GetAnnotationItem(const AnnotationSetItem* set_item, uint32_t index) const { + DCHECK_LE(index, set_item->size_); + return GetAnnotationItemAtOffset(set_item->entries_[index]); + } + const AnnotationSetItem* GetSetRefItemItem(const AnnotationSetRefItem* anno_item) const { uint32_t offset = anno_item->annotations_off_; return (offset == 0) |