mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-07-28 11:49:44 +00:00
LibSQL: Remove superfluous VERIFY
s for Vector
accessing
Remove some `[]` operators' out-of-bounds checks which are already performed by the underlying `Vector`.
This commit is contained in:
parent
234bc0c237
commit
0460a654d4
Notes:
sideshowbarker
2024-07-17 04:34:25 +09:00
Author: https://github.com/gmta
Commit: 0460a654d4
Pull-request: https://github.com/SerenityOS/serenity/pull/16197
Issue: https://github.com/SerenityOS/serenity/issues/15844
Reviewed-by: https://github.com/trflynn89 ✅
4 changed files with 3 additions and 23 deletions
|
@ -91,18 +91,6 @@ Optional<size_t> Tuple::index_of(String name) const
|
|||
return {};
|
||||
}
|
||||
|
||||
Value const& Tuple::operator[](size_t ix) const
|
||||
{
|
||||
VERIFY(ix < m_data.size());
|
||||
return m_data[ix];
|
||||
}
|
||||
|
||||
Value& Tuple::operator[](size_t ix)
|
||||
{
|
||||
VERIFY(ix < m_data.size());
|
||||
return m_data[ix];
|
||||
}
|
||||
|
||||
Value const& Tuple::operator[](String const& name) const
|
||||
{
|
||||
auto index = index_of(name);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue