summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLenny Maiorani <lenny@serenityos.org>2022-06-26 10:20:25 -0600
committerBrian Gianforcaro <b.gianfo@gmail.com>2022-07-04 05:53:56 +0000
commitccbf24096267a25fc4bdc8726d1cb0834ef1fe90 (patch)
treee1b1f4d2073ac4679fede758ffba0c236653c482
parent56cabf80ded750e03c091a8c25f7c6ff8f01fc29 (diff)
downloadserenity-ccbf24096267a25fc4bdc8726d1cb0834ef1fe90.zip
AK: Add `nodiscard` attribute to BinaryHeap functions
-rw-r--r--AK/BinaryHeap.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/AK/BinaryHeap.h b/AK/BinaryHeap.h
index 1fce748366..ecca946d50 100644
--- a/AK/BinaryHeap.h
+++ b/AK/BinaryHeap.h
@@ -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;