mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2024-10-26 06:49:12 +03:00
AK: Make Vector::data() ALWAYS_INLINE
This was showing up in profiles of Browser, and it really shouldn't be.
This commit is contained in:
parent
3729fd06fa
commit
de7b5279cb
Notes:
sideshowbarker
2024-07-17 19:46:32 +09:00
Author: https://github.com/IdanHo Commit: https://github.com/SerenityOS/serenity/commit/de7b5279cb5 Pull-request: https://github.com/SerenityOS/serenity/pull/12296
@ -113,14 +113,14 @@ public:
|
|||||||
ALWAYS_INLINE size_t size() const { return m_size; }
|
ALWAYS_INLINE size_t size() const { return m_size; }
|
||||||
size_t capacity() const { return m_capacity; }
|
size_t capacity() const { return m_capacity; }
|
||||||
|
|
||||||
StorageType* data()
|
ALWAYS_INLINE StorageType* data()
|
||||||
{
|
{
|
||||||
if constexpr (inline_capacity > 0)
|
if constexpr (inline_capacity > 0)
|
||||||
return m_outline_buffer ? m_outline_buffer : inline_buffer();
|
return m_outline_buffer ? m_outline_buffer : inline_buffer();
|
||||||
return m_outline_buffer;
|
return m_outline_buffer;
|
||||||
}
|
}
|
||||||
|
|
||||||
StorageType const* data() const
|
ALWAYS_INLINE StorageType const* data() const
|
||||||
{
|
{
|
||||||
if constexpr (inline_capacity > 0)
|
if constexpr (inline_capacity > 0)
|
||||||
return m_outline_buffer ? m_outline_buffer : inline_buffer();
|
return m_outline_buffer ? m_outline_buffer : inline_buffer();
|
||||||
|
Loading…
Reference in New Issue
Block a user