diff options
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; }; |