diff options
author | HampusM <hampus@hampusmat.com> | 2022-04-24 17:13:52 +0200 |
---|---|---|
committer | HampusM <hampus@hampusmat.com> | 2022-06-13 17:56:58 +0200 |
commit | db6edcd473a684420e9a7611b24462df21165c1b (patch) | |
tree | 9646bdb4f5f6e339a0a01873b44e0b185476ce56 /src/DI/alloc_functor.tpp | |
parent | b36d072ad7a7b9c6e30fcb25d6bbb001a8393468 (diff) |
style: improve function and brace styling
Diffstat (limited to 'src/DI/alloc_functor.tpp')
-rw-r--r-- | src/DI/alloc_functor.tpp | 34 |
1 files changed, 24 insertions, 10 deletions
diff --git a/src/DI/alloc_functor.tpp b/src/DI/alloc_functor.tpp index d3f6946..9611a3d 100644 --- a/src/DI/alloc_functor.tpp +++ b/src/DI/alloc_functor.tpp @@ -18,29 +18,41 @@ auto InvokeReturnWrapper<Return>::call(Args &&...args) -> Return ALLOC_FUNCTOR_TEMPLATE ALLOC_FUNCTOR::AllocFunctor(Target &&function) - : _function(std::piecewise_construct, std::forward_as_tuple(std::move(function)), - std::forward_as_tuple()) + : _function( + std::piecewise_construct, + std::forward_as_tuple(std::move(function)), + std::forward_as_tuple() + ) { } ALLOC_FUNCTOR_TEMPLATE ALLOC_FUNCTOR::AllocFunctor(const Target &function, const Alloc &allocator) - : _function(std::piecewise_construct, std::forward_as_tuple(function), - std::forward_as_tuple(allocator)) + : _function( + std::piecewise_construct, + std::forward_as_tuple(function), + std::forward_as_tuple(allocator) + ) { } ALLOC_FUNCTOR_TEMPLATE ALLOC_FUNCTOR::AllocFunctor(const Target &function, Alloc &&allocator) - : _function(std::piecewise_construct, std::forward_as_tuple(function), - std::forward_as_tuple(std::move(allocator))) + : _function( + std::piecewise_construct, + std::forward_as_tuple(function), + std::forward_as_tuple(std::move(allocator)) + ) { } ALLOC_FUNCTOR_TEMPLATE ALLOC_FUNCTOR::AllocFunctor(Target &&function, Alloc &&allocator) - : _function(std::piecewise_construct, std::forward_as_tuple(std::move(function)), - std::forward_as_tuple(std::move(allocator))) + : _function( + std::piecewise_construct, + std::forward_as_tuple(std::move(function)), + std::forward_as_tuple(std::move(allocator)) + ) { } @@ -75,8 +87,10 @@ auto ALLOC_FUNCTOR::clone() const -> AllocFunctor * using Destructor = AllocDestructor<AllocHelper>; - auto hold = std::unique_ptr<AllocFunctor, Destructor>(alloc_helper.allocate(1), - _Dp(alloc_helper, 1)); + auto hold = std::unique_ptr<AllocFunctor, Destructor>( + alloc_helper.allocate(1), + _Dp(alloc_helper, 1) + ); ::new (static_cast<void *>(hold.get())) AllocFunctor(_function.first(), _Alloc(alloc_helper)); |