From d59b7379c94f68fe61e8288ccc3c5e5e1224e45a Mon Sep 17 00:00:00 2001 From: Ivan Blinkov Date: Tue, 18 Dec 2018 16:19:23 +0300 Subject: [PATCH] fix style issues --- dbms/src/Functions/trim.cpp | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/dbms/src/Functions/trim.cpp b/dbms/src/Functions/trim.cpp index 6b09c643077..f6f9d22496a 100644 --- a/dbms/src/Functions/trim.cpp +++ b/dbms/src/Functions/trim.cpp @@ -14,19 +14,22 @@ namespace ErrorCodes extern const int ILLEGAL_TYPE_OF_ARGUMENT; } -struct TrimModeLeft { +struct TrimModeLeft +{ static constexpr auto name = "trimLeft"; static constexpr bool trim_left = true; static constexpr bool trim_right = false; }; -struct TrimModeRight { +struct TrimModeRight +{ static constexpr auto name = "trimRight"; static constexpr bool trim_left = false; static constexpr bool trim_right = true; }; -struct TrimModeBoth { +struct TrimModeBoth +{ static constexpr auto name = "trimBoth"; static constexpr bool trim_left = true; static constexpr bool trim_right = true; @@ -85,7 +88,8 @@ private: auto mask = bytes_sse; #endif - if constexpr (mode::trim_left) { + if constexpr (mode::trim_left) + { #if __SSE4_2__ /// skip whitespace from left in blocks of up to 16 characters constexpr auto left_sse_mode = base_sse_mode | _SIDD_LEAST_SIGNIFICANT; @@ -101,7 +105,8 @@ private: ++chars_to_trim_left; } - if constexpr (mode::trim_right) { + if constexpr (mode::trim_right) + { constexpr auto right_sse_mode = base_sse_mode | _SIDD_MOST_SIGNIFICANT; const auto trim_right_size = size - chars_to_trim_left; #if __SSE4_2__