util/ScopeExit: copy enabled tag in move constructor

This commit is contained in:
Max Kellermann 2017-04-12 13:11:43 +02:00
parent a13e045742
commit 38da76bbe0

View File

@ -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;
}