mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-08-08 01:00:05 +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:
parent
e08f6a69b2
commit
97d99aa8d6
Notes:
github-actions[bot]
2024-12-09 11:32:11 +00:00
Author: https://github.com/shlyakpavel
Commit: 97d99aa8d6
Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/2839
1 changed files with 1 additions and 0 deletions
|
@ -246,6 +246,7 @@ public:
|
||||||
V take_first()
|
V take_first()
|
||||||
requires(IsOrdered)
|
requires(IsOrdered)
|
||||||
{
|
{
|
||||||
|
VERIFY(!is_empty());
|
||||||
return take(begin()->key).release_value();
|
return take(begin()->key).release_value();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue