mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-09-30 13:19:02 +00:00
AK: Add FixedArray::data()
This commit is contained in:
parent
61a6ae038e
commit
ddefb95b21
Notes:
sideshowbarker
2024-07-19 09:44:35 +09:00
Author: https://github.com/willmcpherson2
Commit: ddefb95b21
Pull-request: https://github.com/SerenityOS/serenity/pull/1150
Reviewed-by: https://github.com/awesomekling
Reviewed-by: https://github.com/bugaevc
1 changed files with 9 additions and 0 deletions
|
@ -71,6 +71,15 @@ public:
|
||||||
|
|
||||||
size_t size() const { return m_size; }
|
size_t size() const { return m_size; }
|
||||||
|
|
||||||
|
T* data()
|
||||||
|
{
|
||||||
|
return m_elements;
|
||||||
|
}
|
||||||
|
const T* data() const
|
||||||
|
{
|
||||||
|
return m_elements;
|
||||||
|
}
|
||||||
|
|
||||||
T& operator[](size_t index)
|
T& operator[](size_t index)
|
||||||
{
|
{
|
||||||
ASSERT(index < m_size);
|
ASSERT(index < m_size);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue