summaryrefslogtreecommitdiff
path: root/zen/scope_guard.h
diff options
context:
space:
mode:
authorB Stack <bgstack15@gmail.com>2020-09-01 00:24:17 +0000
committerB Stack <bgstack15@gmail.com>2020-09-01 00:24:17 +0000
commit5a3f52b016581a6a0cb4513614b6c620d365dde2 (patch)
treeacfdfb3e1046db87040477033fda0df76d92916a /zen/scope_guard.h
parentMerge branch '11.0' into 'master' (diff)
parentadd upstream 11.1 (diff)
downloadFreeFileSync-11.1.tar.gz
FreeFileSync-11.1.tar.bz2
FreeFileSync-11.1.zip
Merge branch '11.1' into 'master'11.1
add upstream 11.1 See merge request opensource-tracking/FreeFileSync!25
Diffstat (limited to 'zen/scope_guard.h')
-rw-r--r--zen/scope_guard.h21
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
{
bgstack15