mirror of
https://github.com/RGBCube/serenity
synced 2025-07-26 19:17:35 +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 };
|
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
|
ALWAYS_INLINE const T& at(size_t index) const
|
||||||
{
|
{
|
||||||
ASSERT(index < this->m_size);
|
ASSERT(index < this->m_size);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue