mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-04-21 03:55:24 +00:00
AK: Add bounds assertions in Vector::operator[].
I was sure I had this already.
This commit is contained in:
parent
c77f32d2f0
commit
612c02307e
Notes:
sideshowbarker
2024-07-19 15:52:10 +09:00
Author: https://github.com/awesomekling Commit: https://github.com/SerenityOS/serenity/commit/612c02307e9
1 changed files with 2 additions and 2 deletions
|
@ -33,8 +33,8 @@ public:
|
|||
size_t size() const { return m_size; }
|
||||
size_t capacity() const { return m_capacity; }
|
||||
|
||||
T& at(size_t i) { return *slot(i); }
|
||||
const T& at(size_t i) const { return *slot(i); }
|
||||
T& at(size_t i) { ASSERT(i < m_size); return *slot(i); }
|
||||
const T& at(size_t i) const { ASSERT(i < m_size); return *slot(i); }
|
||||
|
||||
void remove(size_t index)
|
||||
{
|
||||
|
|
Loading…
Add table
Reference in a new issue