mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 19:17:44 +00:00
AK: Add offset() method to Span.
This commit is contained in:
parent
a922abd9d7
commit
8d2dba022e
1 changed files with 6 additions and 0 deletions
|
@ -150,6 +150,12 @@ public:
|
|||
return { this->m_values + start, size };
|
||||
}
|
||||
|
||||
ALWAYS_INLINE T* offset(size_t start) const
|
||||
{
|
||||
ASSERT(start < this->m_size);
|
||||
return this->m_values + start;
|
||||
}
|
||||
|
||||
ALWAYS_INLINE const T& at(size_t index) const
|
||||
{
|
||||
ASSERT(index < this->m_size);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue