1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-27 06:17:35 +00:00

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

View file

@ -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;