diff options
| author | 2018-10-01 15:32:20 +0100 | |
|---|---|---|
| committer | 2018-10-03 14:38:59 +0100 | |
| commit | 56de89aaf2a224de8c436291e3c23a1a61315437 (patch) | |
| tree | 397fafa3662d1abde6fecff49f24a559c2b0ab32 /runtime/mirror/array-inl.h | |
| parent | ededf08e2f4a5df3401a5d4badb98ff3c8cb8fb9 (diff) | |
Mark most *Offset helper functions as constexpr.
Making the values compile-time constants will help to
clean up the cpp-define-generator.
Test: test.py -b -g
Change-Id: I612a19a54062784b501bfe4f41c6642d48e0dd21
Diffstat (limited to 'runtime/mirror/array-inl.h')
| -rw-r--r-- | runtime/mirror/array-inl.h | 8 |
1 files changed, 0 insertions, 8 deletions
diff --git a/runtime/mirror/array-inl.h b/runtime/mirror/array-inl.h index 2e395302af..704fb118e3 100644 --- a/runtime/mirror/array-inl.h +++ b/runtime/mirror/array-inl.h @@ -50,14 +50,6 @@ inline size_t Array::SizeOf() { return header_size + data_size; } -inline MemberOffset Array::DataOffset(size_t component_size) { - DCHECK(IsPowerOfTwo(component_size)) << component_size; - size_t data_offset = RoundUp(OFFSETOF_MEMBER(Array, first_element_), component_size); - DCHECK_EQ(RoundUp(data_offset, component_size), data_offset) - << "Array data offset isn't aligned with component size"; - return MemberOffset(data_offset); -} - template<VerifyObjectFlags kVerifyFlags> inline bool Array::CheckIsValidIndex(int32_t index) { if (UNLIKELY(static_cast<uint32_t>(index) >= |