diff options
author | Idan Horowitz <idan.horowitz@gmail.com> | 2022-02-05 17:35:23 +0200 |
---|---|---|
committer | Andreas Kling <kling@serenityos.org> | 2022-02-05 16:48:14 +0100 |
commit | de7b5279cb557b46eed128c5ba298d62577dce88 (patch) | |
tree | ecf60c7cd5c08c76840830a99acbb744f64ea859 /AK/Vector.h | |
parent | 3729fd06fab66f5462081eecdc42e4a38d509426 (diff) | |
download | serenity-de7b5279cb557b46eed128c5ba298d62577dce88.zip |
AK: Make Vector::data() ALWAYS_INLINE
This was showing up in profiles of Browser, and it really shouldn't be.
Diffstat (limited to 'AK/Vector.h')
-rw-r--r-- | AK/Vector.h | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/AK/Vector.h b/AK/Vector.h index 217507d484..ee77357f0b 100644 --- a/AK/Vector.h +++ b/AK/Vector.h @@ -113,14 +113,14 @@ public: ALWAYS_INLINE size_t size() const { return m_size; } size_t capacity() const { return m_capacity; } - StorageType* data() + ALWAYS_INLINE StorageType* data() { if constexpr (inline_capacity > 0) return m_outline_buffer ? m_outline_buffer : inline_buffer(); return m_outline_buffer; } - StorageType const* data() const + ALWAYS_INLINE StorageType const* data() const { if constexpr (inline_capacity > 0) return m_outline_buffer ? m_outline_buffer : inline_buffer(); |