diff --git a/AK/ScopeGuard.h b/AK/ScopeGuard.h index a023a1c68cd..043a37e2750 100644 --- a/AK/ScopeGuard.h +++ b/AK/ScopeGuard.h @@ -11,7 +11,7 @@ namespace AK { template -class ScopeGuard { +class [[nodiscard]] ScopeGuard { public: ScopeGuard(Callback callback) : m_callback(move(callback)) @@ -28,7 +28,7 @@ private: }; template -class ArmedScopeGuard { +class [[nodiscard]] ArmedScopeGuard { public: ArmedScopeGuard(Callback callback) : m_callback(move(callback))