diff options
author | rtk0c <[email protected]> | 2022-11-27 12:04:31 -0800 |
---|---|---|
committer | rtk0c <[email protected]> | 2022-11-27 12:04:31 -0800 |
commit | 182c8f8357739f905bbd721006480502435b6b43 (patch) | |
tree | 082613a474d863182e2ad8f2167f1643f26e67a3 /app/source/Cplt/Utils/ScopeGuard.hpp | |
parent | b01ed99a1cd0c863c8709930658513c04dd70f61 (diff) |
Update brace style to match rest of my projectscplt-imgui
Diffstat (limited to 'app/source/Cplt/Utils/ScopeGuard.hpp')
-rw-r--r-- | app/source/Cplt/Utils/ScopeGuard.hpp | 12 |
1 files changed, 4 insertions, 8 deletions
diff --git a/app/source/Cplt/Utils/ScopeGuard.hpp b/app/source/Cplt/Utils/ScopeGuard.hpp index f2b7f46..e7db2a4 100644 --- a/app/source/Cplt/Utils/ScopeGuard.hpp +++ b/app/source/Cplt/Utils/ScopeGuard.hpp @@ -5,8 +5,7 @@ #include <utility> template <class TCleanupFunc> -class ScopeGuard -{ +class ScopeGuard { private: TCleanupFunc mFunc; bool mDismissed = false; @@ -19,19 +18,16 @@ public: /// would work. It is highly discourage and unlikely that one would want to use ScopeGuard as a function /// parameter, so the normal argument that implicit conversion are harmful doesn't really apply here. ScopeGuard(TCleanupFunc func) - : mFunc{ std::move(func) } - { + : mFunc{ std::move(func) } { } - ~ScopeGuard() - { + ~ScopeGuard() { if (!mDismissed) { mFunc(); } } - void Dismiss() noexcept - { + void Dismiss() noexcept { mDismissed = true; } }; |