mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-07-30 04:39:06 +00:00
LibSQL: Remove and update VERIFY
s
We are performing a lot of checks on pointers that are performed again immediately afterwards because of a dereference. This removes the redundant `VERIFY`s and simplifies a couple others.
This commit is contained in:
parent
036eb82aca
commit
8992ff5aeb
Notes:
sideshowbarker
2024-07-17 02:59:43 +09:00
Author: https://github.com/gmta
Commit: 8992ff5aeb
Pull-request: https://github.com/SerenityOS/serenity/pull/18476
Reviewed-by: https://github.com/trflynn89 ✅
5 changed files with 2 additions and 15 deletions
|
@ -187,13 +187,11 @@ Key const& HashBucket::operator[](size_t ix)
|
|||
{
|
||||
if (!m_inflated)
|
||||
m_hash_index.serializer().deserialize_block_to(pointer(), *this);
|
||||
VERIFY(ix < size());
|
||||
return m_entries[ix];
|
||||
}
|
||||
|
||||
Key const& HashBucket::operator[](size_t ix) const
|
||||
{
|
||||
VERIFY(ix < m_entries.size());
|
||||
return m_entries[ix];
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue