AK: Make ScopeGuard and ArmedScopeGuard [[nodiscard]]
Brought to you by a significant amount of pain and suffering, which this would have prevented.
This commit is contained in:
parent
10766ecf54
commit
c86ad5c505
1 changed files with 2 additions and 2 deletions
|
|
@ -11,7 +11,7 @@
|
|||
namespace AK {
|
||||
|
||||
template<typename Callback>
|
||||
class ScopeGuard {
|
||||
class [[nodiscard]] ScopeGuard {
|
||||
public:
|
||||
ScopeGuard(Callback callback)
|
||||
: m_callback(move(callback))
|
||||
|
|
@ -28,7 +28,7 @@ private:
|
|||
};
|
||||
|
||||
template<typename Callback>
|
||||
class ArmedScopeGuard {
|
||||
class [[nodiscard]] ArmedScopeGuard {
|
||||
public:
|
||||
ArmedScopeGuard(Callback callback)
|
||||
: m_callback(move(callback))
|
||||
|
|
|
|||
Loading…
Reference in a new issue