diff --git a/AK/RefCounted.h b/AK/RefCounted.h index 17d6330f00..29eb554285 100644 --- a/AK/RefCounted.h +++ b/AK/RefCounted.h @@ -74,7 +74,7 @@ public: ASSERT(!Checked::addition_would_overflow(old_ref_count, 1)); } - ALWAYS_INLINE bool try_ref() const + [[nodiscard]] ALWAYS_INLINE bool try_ref() const { RefCountType expected = m_ref_count.load(AK::MemoryOrder::memory_order_relaxed); for (;;) {