From 9c53bfdb18c5ce9e93bbb95509516e7a334e6e7b Mon Sep 17 00:00:00 2001 From: Yakov Olkhovskiy Date: Mon, 14 Nov 2022 14:46:04 +0000 Subject: [PATCH] fix style --- src/IO/ReadHelpers.h | 8 +++++--- src/IO/WriteHelpers.cpp | 3 ++- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/src/IO/ReadHelpers.h b/src/IO/ReadHelpers.h index 53fecab4d7e..f7b785f6026 100644 --- a/src/IO/ReadHelpers.h +++ b/src/IO/ReadHelpers.h @@ -843,7 +843,8 @@ inline ReturnType readIPv4TextImpl(IPv4 & ip, ReadBuffer & buf) char s[16]; size_t size = buf.read(s, sizeof(s)); - auto ret_false = [&]() { + auto ret_false = [&]() + { if constexpr (std::is_same_v) throw ParsingException(std::string("Cannot parse IPv4 ") + s, ErrorCodes::CANNOT_PARSE_IPV4); else @@ -897,7 +898,8 @@ inline ReturnType readIPv6TextImpl(IPv6 & ip, ReadBuffer & buf) char s[40]; size_t size = buf.read(s, sizeof(s)); - auto ret_false = [&]() { + auto ret_false = [&]() + { if constexpr (std::is_same_v) throw ParsingException(std::string("Cannot parse IPv6 ") + s, ErrorCodes::CANNOT_PARSE_IPV6); else @@ -909,7 +911,7 @@ inline ReturnType readIPv6TextImpl(IPv6 & ip, ReadBuffer & buf) if (parseIPv6(s, reinterpret_cast(ip.toUnderType().items))) return ReturnType(true); - + return ret_false(); } diff --git a/src/IO/WriteHelpers.cpp b/src/IO/WriteHelpers.cpp index 96ca2c7da2c..824bf95605c 100644 --- a/src/IO/WriteHelpers.cpp +++ b/src/IO/WriteHelpers.cpp @@ -41,7 +41,8 @@ void formatUUID(std::reverse_iterator src16, UInt8 * dst36) namespace detail { template - struct ToChars { + struct ToChars + { static const char value[]; static const size_t size; };