AK: Add nodiscard attribute to BinaryHeap functions

This commit is contained in:
Lenny Maiorani 2022-06-26 10:20:25 -06:00 committed by Brian Gianforcaro
parent 56cabf80de
commit ccbf240962
Notes: sideshowbarker 2024-07-17 09:45:27 +09:00

View File

@ -52,13 +52,13 @@ public:
return m_elements[index].value;
}
const V& peek_min() const
[[nodiscard]] const V& peek_min() const
{
VERIFY(!is_empty());
return m_elements[0].value;
}
const K& peek_min_key() const
[[nodiscard]] const K& peek_min_key() const
{
VERIFY(!is_empty());
return m_elements[0].key;