util/ScopeExit: copy enabled tag in move constructor
This commit is contained in:
parent
a13e045742
commit
38da76bbe0
@ -45,7 +45,7 @@ public:
|
||||
explicit ScopeExitGuard(F &&f):F(std::forward<F>(f)) {}
|
||||
|
||||
ScopeExitGuard(ScopeExitGuard &&src)
|
||||
:F(std::move(src)) {
|
||||
:F(std::move(src)), enabled(src.enabled) {
|
||||
src.enabled = false;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user