diff --git a/AK/ScopeGuard.h b/AK/ScopeGuard.h index a023a1c68cdb..043a37e2750e 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 @@ class ScopeGuard { }; template -class ArmedScopeGuard { +class [[nodiscard]] ArmedScopeGuard { public: ArmedScopeGuard(Callback callback) : m_callback(move(callback))