diff options
author | B Stack <bgstack15@gmail.com> | 2020-08-31 20:07:13 -0400 |
---|---|---|
committer | B Stack <bgstack15@gmail.com> | 2020-08-31 20:07:13 -0400 |
commit | 8a27fa9c617533e76673ce61a65e2ba869b52208 (patch) | |
tree | acfdfb3e1046db87040477033fda0df76d92916a /zen/scope_guard.h | |
parent | Merge branch '11.0' into 'master' (diff) | |
download | FreeFileSync-8a27fa9c617533e76673ce61a65e2ba869b52208.tar.gz FreeFileSync-8a27fa9c617533e76673ce61a65e2ba869b52208.tar.bz2 FreeFileSync-8a27fa9c617533e76673ce61a65e2ba869b52208.zip |
add upstream 11.1
Diffstat (limited to 'zen/scope_guard.h')
-rw-r--r-- | zen/scope_guard.h | 21 |
1 files changed, 10 insertions, 11 deletions
diff --git a/zen/scope_guard.h b/zen/scope_guard.h index e97d3f0a..61422eb4 100644 --- a/zen/scope_guard.h +++ b/zen/scope_guard.h @@ -16,17 +16,16 @@ namespace zen { -//Scope Guard -/* - auto guardAio = zen::makeGuard<ScopeGuardRunMode::onExit>([&] { ::CloseHandle(hDir); }); - ... - guardAio.dismiss(); - -Scope Exit: - ZEN_ON_SCOPE_EXIT(::CloseHandle(hDir)); - ZEN_ON_SCOPE_FAIL(UndoPreviousWork()); - ZEN_ON_SCOPE_SUCCESS(NotifySuccess()); -*/ +/* Scope Guard + + auto guardAio = zen::makeGuard<ScopeGuardRunMode::onExit>([&] { ::CloseHandle(hDir); }); + ... + guardAio.dismiss(); + + Scope Exit: + ZEN_ON_SCOPE_EXIT (CleanUp()); + ZEN_ON_SCOPE_FAIL (UndoPreviousWork()); + ZEN_ON_SCOPE_SUCCESS(NotifySuccess()); */ enum class ScopeGuardRunMode { |