mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2024-09-11 13:36:13 +03:00
AK: Add nodiscard
attribute to BinaryHeap functions
This commit is contained in:
parent
56cabf80de
commit
ccbf240962
Notes:
sideshowbarker
2024-07-17 09:45:27 +09:00
Author: https://github.com/ldm5180 Commit: https://github.com/SerenityOS/serenity/commit/ccbf240962 Pull-request: https://github.com/SerenityOS/serenity/pull/14395 Reviewed-by: https://github.com/linusg
@ -52,13 +52,13 @@ public:
|
|||||||
return m_elements[index].value;
|
return m_elements[index].value;
|
||||||
}
|
}
|
||||||
|
|
||||||
const V& peek_min() const
|
[[nodiscard]] const V& peek_min() const
|
||||||
{
|
{
|
||||||
VERIFY(!is_empty());
|
VERIFY(!is_empty());
|
||||||
return m_elements[0].value;
|
return m_elements[0].value;
|
||||||
}
|
}
|
||||||
|
|
||||||
const K& peek_min_key() const
|
[[nodiscard]] const K& peek_min_key() const
|
||||||
{
|
{
|
||||||
VERIFY(!is_empty());
|
VERIFY(!is_empty());
|
||||||
return m_elements[0].key;
|
return m_elements[0].key;
|
||||||
|
Loading…
Reference in New Issue
Block a user