mirror of
https://github.com/fergalmoran/ladybird.git
synced 2025-12-22 09:19:03 +00:00
AK: Verify that HashMap is not empty in take_first
This makes the behavior uniform with: - HashTable - SinglyLinkedList - Vector
This commit is contained in:
committed by
Jelle Raaijmakers
parent
e08f6a69b2
commit
97d99aa8d6
@@ -246,6 +246,7 @@ public:
|
||||
V take_first()
|
||||
requires(IsOrdered)
|
||||
{
|
||||
VERIFY(!is_empty());
|
||||
return take(begin()->key).release_value();
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user