diff options
author | Emmanuel Gil Peyrot <linkmauve@linkmauve.fr> | 2016-09-18 09:38:01 +0900 |
---|---|---|
committer | Emmanuel Gil Peyrot <linkmauve@linkmauve.fr> | 2016-09-18 09:38:01 +0900 |
commit | dc8479928c5aee4c6ad6fe4f59006fb604cee701 (patch) | |
tree | 569a7f13128450bbab973236615587ff00bced5f /src/common/scope_exit.h | |
parent | fe948af0952d7badacbce62a8e35a3a1421245ba (diff) |
Sources: Run clang-format on everything.
Diffstat (limited to 'src/common/scope_exit.h')
-rw-r--r-- | src/common/scope_exit.h | 23 |
1 files changed, 14 insertions, 9 deletions
diff --git a/src/common/scope_exit.h b/src/common/scope_exit.h index 08f09a8c86..73b2a262e7 100644 --- a/src/common/scope_exit.h +++ b/src/common/scope_exit.h @@ -4,20 +4,25 @@ #pragma once -#include "common/common_funcs.h" #include <utility> +#include "common/common_funcs.h" namespace detail { - template <typename Func> - struct ScopeExitHelper { - explicit ScopeExitHelper(Func&& func) : func(std::move(func)) {} - ~ScopeExitHelper() { func(); } +template <typename Func> +struct ScopeExitHelper { + explicit ScopeExitHelper(Func&& func) : func(std::move(func)) { + } + ~ScopeExitHelper() { + func(); + } - Func func; - }; + Func func; +}; - template <typename Func> - ScopeExitHelper<Func> ScopeExit(Func&& func) { return ScopeExitHelper<Func>(std::move(func)); } +template <typename Func> +ScopeExitHelper<Func> ScopeExit(Func&& func) { + return ScopeExitHelper<Func>(std::move(func)); +} } /** |