mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-01-22 09:12:13 -05:00
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
Notes:
github-actions[bot]
2025-01-09 18:37:35 +00:00
Author: https://github.com/AtkinsSJ Commit: https://github.com/LadybirdBrowser/ladybird/commit/c86ad5c5050 Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/3197 Reviewed-by: https://github.com/tcl3 ✅
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