From a8671ec1666b95ff7ef09412b09eaf1896ebd398 Mon Sep 17 00:00:00 2001 From: Brian Gianforcaro Date: Sun, 11 Apr 2021 01:23:30 -0700 Subject: [PATCH] AK: Annotate HashMap functions with [[nodiscard]] --- AK/HashMap.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/AK/HashMap.h b/AK/HashMap.h index 81e30b26ac..bde7cb8b2a 100644 --- a/AK/HashMap.h +++ b/AK/HashMap.h @@ -64,12 +64,12 @@ public: } #endif - bool is_empty() const + [[nodiscard]] bool is_empty() const { return m_table.is_empty(); } - size_t size() const { return m_table.size(); } - size_t capacity() const { return m_table.capacity(); } + [[nodiscard]] size_t size() const { return m_table.size(); } + [[nodiscard]] size_t capacity() const { return m_table.capacity(); } void clear() { m_table.clear(); } HashSetResult set(const K& key, const V& value) { return m_table.set({ key, value }); }