diff --git a/AK/OwnPtr.h b/AK/OwnPtr.h index 2ece450e81..6b87526092 100644 --- a/AK/OwnPtr.h +++ b/AK/OwnPtr.h @@ -137,7 +137,7 @@ public: bool operator!() const { return !m_ptr; } - T* leak_ptr() + [[nodiscard]] T* leak_ptr() { T* leaked_ptr = m_ptr; m_ptr = nullptr;