mirror of
https://github.com/SerenityOS/serenity.git
synced 2025-01-23 09:51:57 -05: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…
Reference in a new issue