Truly independent web browser
AK: Make ScopeGuard and ArmedScopeGuard non-copyable and non-movable
Andreas Klingb56e3342ed99
diff --git a/AK/ScopeGuard.h b/AK/ScopeGuard.hindex 043a37e2750..89a153ba548 100644--- a/AK/ScopeGuard.h+++ b/AK/ScopeGuard.h@@ -6,12 +6,16 @@#pragma once+#include <AK/Noncopyable.h>#include <AK/StdLibExtras.h>namespace AK {template<typename Callback>class [[nodiscard]] ScopeGuard {+ AK_MAKE_NONCOPYABLE(ScopeGuard);+ AK_MAKE_NONMOVABLE(ScopeGuard);+public:ScopeGuard(Callback callback): m_callback(move(callback))@@ -29,6 +33,9 @@ private:template<typename Callback>class [[nodiscard]] ArmedScopeGuard {+ AK_MAKE_NONCOPYABLE(ArmedScopeGuard);+ AK_MAKE_NONMOVABLE(ArmedScopeGuard);+public:ArmedScopeGuard(Callback callback): m_callback(move(callback))