mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-01-22 09:12:13 -05: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: https://github.com/LadybirdBrowser/ladybird/commit/97d99aa8d6b 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()
|
||||
requires(IsOrdered)
|
||||
{
|
||||
VERIFY(!is_empty());
|
||||
return take(begin()->key).release_value();
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue