From 28e40e22c0d0bbdd4728e5038c3902657ab96eae Mon Sep 17 00:00:00 2001 From: Brian Gianforcaro Date: Sun, 11 Apr 2021 01:25:58 -0700 Subject: [PATCH] AK: Annotate IntrusiveList functions as [[nodiscard]] --- AK/IntrusiveList.h | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/AK/IntrusiveList.h b/AK/IntrusiveList.h index 132d45ca51..fb183a77f9 100644 --- a/AK/IntrusiveList.h +++ b/AK/IntrusiveList.h @@ -47,16 +47,16 @@ public: ~IntrusiveList(); void clear(); - bool is_empty() const; + [[nodiscard]] bool is_empty() const; void append(T& n); void prepend(T& n); void remove(T& n); - bool contains(const T&) const; - T* first() const; - T* last() const; + [[nodiscard]] bool contains(const T&) const; + [[nodiscard]] T* first() const; + [[nodiscard]] T* last() const; - T* take_first(); - T* take_last(); + [[nodiscard]] T* take_first(); + [[nodiscard]] T* take_last(); class Iterator { public: