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/util/color.cpp | 6 ++++-- src/util/function.tpp | 14 ++++++++------ 2 files changed, 12 insertions(+), 8 deletions(-) (limited to 'src/util') diff --git a/src/util/color.cpp b/src/util/color.cpp index 8ec3ad4..8f23f41 100644 --- a/src/util/color.cpp +++ b/src/util/color.cpp @@ -5,11 +5,13 @@ auto get_foreground_esc_seq(const uint32_t &color) noexcept -> std::string { return { - fmt::detail::make_foreground_color(fmt::detail::color_type(color)).begin()}; + fmt::detail::make_foreground_color(fmt::detail::color_type(color)).begin() + }; } auto get_background_esc_seq(const uint32_t &color) noexcept -> std::string { return { - fmt::detail::make_background_color(fmt::detail::color_type(color)).begin()}; + fmt::detail::make_background_color(fmt::detail::color_type(color)).begin() + }; } diff --git a/src/util/function.tpp b/src/util/function.tpp index 6ff939b..0a7a6d6 100644 --- a/src/util/function.tpp +++ b/src/util/function.tpp @@ -45,15 +45,15 @@ constexpr inline auto extract_signature(Function const & /*unused*/) noexcept } template -inline auto get_normalized_lambda(Function &&func, - Signature /*unused*/) noexcept +inline auto +get_normalized_lambda(Function &&func, Signature /*unused*/) noexcept { // Static copy of func. This will make it accessible for the lambda without using a // lamda capture static auto static_func = Function(std::forward(func)); - return +[](Args... args) noexcept( - noexcept(std::declval()(std::forward(args)...))) -> Return + return +[](Args... args) noexcept(noexcept(std::declval( + )(std::forward(args)...))) -> Return { return static_func(std::forward(args)...); }; @@ -70,6 +70,8 @@ inline auto get_normalized_lambda(Function &&func, template constexpr auto normalize_lambda(Function &&func) noexcept { - return get_normalized_lambda(std::forward(func), - extract_signature(std::forward(func))); + return get_normalized_lambda( + std::forward(func), + extract_signature(std::forward(func)) + ); } -- cgit v1.2.3-18-g5258