AK: Add offset() method to Span.

This commit is contained in:
asynts 2020-07-27 15:19:29 +02:00 committed by Andreas Kling
parent a922abd9d7
commit 8d2dba022e

View file

@ -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);