diff options
author | Daniel Wilhelm <daniel@wili.li> | 2016-03-16 21:32:07 +0100 |
---|---|---|
committer | Daniel Wilhelm <daniel@wili.li> | 2016-03-16 21:32:07 +0100 |
commit | ce3574cf7ff2ee68608b4d001f5a6dd1e36b2252 (patch) | |
tree | 576b1741351e1cd34f0fcce49f98df9c17e10912 /zen/scope_guard.h | |
parent | 7.6 (diff) | |
download | FreeFileSync-ce3574cf7ff2ee68608b4d001f5a6dd1e36b2252.tar.gz FreeFileSync-ce3574cf7ff2ee68608b4d001f5a6dd1e36b2252.tar.bz2 FreeFileSync-ce3574cf7ff2ee68608b4d001f5a6dd1e36b2252.zip |
7.7
Diffstat (limited to 'zen/scope_guard.h')
-rw-r--r-- | zen/scope_guard.h | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/zen/scope_guard.h b/zen/scope_guard.h index 791764de..1345447e 100644 --- a/zen/scope_guard.h +++ b/zen/scope_guard.h @@ -73,11 +73,11 @@ public: ~ScopeGuard() noexcept(runMode != ScopeGuardRunMode::ON_SUCCESS) { + if (!dismissed) + { #ifdef _MSC_VER #pragma warning(suppress: 4127) //"conditional expression is constant" #endif - if (!dismissed) - { if (runMode != ScopeGuardRunMode::ON_EXIT) { const bool failed = getUncaughtExceptionCount() > exeptionCount; @@ -85,6 +85,9 @@ public: return; } +#ifdef _MSC_VER + #pragma warning(suppress: 4127) //"conditional expression is constant" +#endif if (runMode == ScopeGuardRunMode::ON_SUCCESS) fun_(); //throw X else |