From 38da76bbe0ba1eda82c5b0f6bb69b3f7bd0c9b73 Mon Sep 17 00:00:00 2001 From: Max Kellermann Date: Wed, 12 Apr 2017 13:11:43 +0200 Subject: [PATCH] util/ScopeExit: copy enabled tag in move constructor --- src/util/ScopeExit.hxx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/util/ScopeExit.hxx b/src/util/ScopeExit.hxx index 0c7414f18..e93601dd4 100644 --- a/src/util/ScopeExit.hxx +++ b/src/util/ScopeExit.hxx @@ -45,7 +45,7 @@ public: explicit ScopeExitGuard(F &&f):F(std::forward(f)) {} ScopeExitGuard(ScopeExitGuard &&src) - :F(std::move(src)) { + :F(std::move(src)), enabled(src.enabled) { src.enabled = false; }