aboutsummaryrefslogtreecommitdiff
path: root/src/util
diff options
context:
space:
mode:
authorHampusM <hampus@hampusmat.com>2022-04-24 17:13:52 +0200
committerHampusM <hampus@hampusmat.com>2022-06-13 17:56:58 +0200
commitdb6edcd473a684420e9a7611b24462df21165c1b (patch)
tree9646bdb4f5f6e339a0a01873b44e0b185476ce56 /src/util
parentb36d072ad7a7b9c6e30fcb25d6bbb001a8393468 (diff)
style: improve function and brace styling
Diffstat (limited to 'src/util')
-rw-r--r--src/util/color.cpp6
-rw-r--r--src/util/function.tpp14
2 files changed, 12 insertions, 8 deletions
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<char>(fmt::detail::color_type(color)).begin()};
+ fmt::detail::make_foreground_color<char>(fmt::detail::color_type(color)).begin()
+ };
}
auto get_background_esc_seq(const uint32_t &color) noexcept -> std::string
{
return {
- fmt::detail::make_background_color<char>(fmt::detail::color_type(color)).begin()};
+ fmt::detail::make_background_color<char>(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 <typename Function, typename Return, typename... Args>
-inline auto get_normalized_lambda(Function &&func,
- Signature<Return(Args...)> /*unused*/) noexcept
+inline auto
+get_normalized_lambda(Function &&func, Signature<Return(Args...)> /*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<Function>(func));
- return +[](Args... args) noexcept(
- noexcept(std::declval<Function>()(std::forward<Args>(args)...))) -> Return
+ return +[](Args... args) noexcept(noexcept(std::declval<Function>(
+ )(std::forward<Args>(args)...))) -> Return
{
return static_func(std::forward<Args>(args)...);
};
@@ -70,6 +70,8 @@ inline auto get_normalized_lambda(Function &&func,
template <typename Function>
constexpr auto normalize_lambda(Function &&func) noexcept
{
- return get_normalized_lambda(std::forward<Function>(func),
- extract_signature(std::forward<Function>(func)));
+ return get_normalized_lambda(
+ std::forward<Function>(func),
+ extract_signature(std::forward<Function>(func))
+ );
}