diff options
author | Daniel Wilhelm <shieldwed@outlook.com> | 2016-10-29 11:41:53 +0200 |
---|---|---|
committer | Daniel Wilhelm <shieldwed@outlook.com> | 2016-10-29 11:41:53 +0200 |
commit | 7302bb4484d517a72cdffbd13ec7a9f2324cde01 (patch) | |
tree | 17d2964c6768d49510206836a496fb1802a63e08 /zen/scope_guard.h | |
parent | 8.5 (diff) | |
download | FreeFileSync-7302bb4484d517a72cdffbd13ec7a9f2324cde01.tar.gz FreeFileSync-7302bb4484d517a72cdffbd13ec7a9f2324cde01.tar.bz2 FreeFileSync-7302bb4484d517a72cdffbd13ec7a9f2324cde01.zip |
8.6
Diffstat (limited to 'zen/scope_guard.h')
-rw-r--r-- | zen/scope_guard.h | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/zen/scope_guard.h b/zen/scope_guard.h index 8ab58901..853f51b9 100644 --- a/zen/scope_guard.h +++ b/zen/scope_guard.h @@ -95,24 +95,24 @@ public: explicit ScopeGuard( F&& fun) : fun_(std::move(fun)) {} ScopeGuard(ScopeGuard&& other) : fun_(std::move(other.fun_)), - exeptionCount(other.exeptionCount), - dismissed(other.dismissed) { other.dismissed = true; } + exeptionCount_(other.exeptionCount_), + dismissed_(other.dismissed_) { other.dismissed_ = true; } ~ScopeGuard() noexcept(runMode != ScopeGuardRunMode::ON_SUCCESS) { - if (!dismissed) - runScopeGuardDestructor(fun_, exeptionCount, StaticEnum<ScopeGuardRunMode, runMode>()); + if (!dismissed_) + runScopeGuardDestructor(fun_, exeptionCount_, StaticEnum<ScopeGuardRunMode, runMode>()); } - void dismiss() { dismissed = true; } + void dismiss() { dismissed_ = true; } private: ScopeGuard (const ScopeGuard&) = delete; ScopeGuard& operator=(const ScopeGuard&) = delete; F fun_; - const int exeptionCount = getUncaughtExceptionCount(); - bool dismissed = false; + const int exeptionCount_ = getUncaughtExceptionCount(); + bool dismissed_ = false; }; |