Skip to content

Commit

Permalink
AK: Add nodiscard attribute to BinaryHeap functions
Browse files Browse the repository at this point in the history
  • Loading branch information
ldm5180 authored and bgianfo committed Jul 4, 2022
1 parent 56cabf8 commit ccbf240
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions AK/BinaryHeap.h
Original file line number Diff line number Diff line change
Expand Up @@ -52,13 +52,13 @@ class BinaryHeap {
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;
Expand Down

0 comments on commit ccbf240

Please sign in to comment.