From db6edcd473a684420e9a7611b24462df21165c1b Mon Sep 17 00:00:00 2001 From: HampusM Date: Sun, 24 Apr 2022 17:13:52 +0200 Subject: style: improve function and brace styling --- src/DI/alloc_functor.tpp | 34 ++++++++++++++++++++++++---------- 1 file changed, 24 insertions(+), 10 deletions(-) (limited to 'src/DI/alloc_functor.tpp') 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::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; - auto hold = std::unique_ptr(alloc_helper.allocate(1), - _Dp(alloc_helper, 1)); + auto hold = std::unique_ptr( + alloc_helper.allocate(1), + _Dp(alloc_helper, 1) + ); ::new (static_cast(hold.get())) AllocFunctor(_function.first(), _Alloc(alloc_helper)); -- cgit v1.2.3-18-g5258