AK: Annotate IntrusiveList functions as [[nodiscard]]

This commit is contained in:
Brian Gianforcaro 2021-04-11 01:25:58 -07:00 committed by Andreas Kling
parent 0593fa4dcb
commit 28e40e22c0
Notes: sideshowbarker 2024-07-18 20:32:09 +09:00

View file

@ -47,16 +47,16 @@ public:
~IntrusiveList(); ~IntrusiveList();
void clear(); void clear();
bool is_empty() const; [[nodiscard]] bool is_empty() const;
void append(T& n); void append(T& n);
void prepend(T& n); void prepend(T& n);
void remove(T& n); void remove(T& n);
bool contains(const T&) const; [[nodiscard]] bool contains(const T&) const;
T* first() const; [[nodiscard]] T* first() const;
T* last() const; [[nodiscard]] T* last() const;
T* take_first(); [[nodiscard]] T* take_first();
T* take_last(); [[nodiscard]] T* take_last();
class Iterator { class Iterator {
public: public: