Commit 38da76bb authored by Max Kellermann's avatar Max Kellermann

util/ScopeExit: copy enabled tag in move constructor

parent a13e0457
...@@ -45,7 +45,7 @@ public: ...@@ -45,7 +45,7 @@ public:
explicit ScopeExitGuard(F &&f):F(std::forward<F>(f)) {} explicit ScopeExitGuard(F &&f):F(std::forward<F>(f)) {}
ScopeExitGuard(ScopeExitGuard &&src) ScopeExitGuard(ScopeExitGuard &&src)
:F(std::move(src)) { :F(std::move(src)), enabled(src.enabled) {
src.enabled = false; src.enabled = false;
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment