mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-12-14 02:12:21 +00:00
fix style
This commit is contained in:
parent
9aeebf3bdf
commit
9c53bfdb18
@ -843,7 +843,8 @@ inline ReturnType readIPv4TextImpl(IPv4 & ip, ReadBuffer & buf)
|
|||||||
char s[16];
|
char s[16];
|
||||||
size_t size = buf.read(s, sizeof(s));
|
size_t size = buf.read(s, sizeof(s));
|
||||||
|
|
||||||
auto ret_false = [&]() {
|
auto ret_false = [&]()
|
||||||
|
{
|
||||||
if constexpr (std::is_same_v<ReturnType, void>)
|
if constexpr (std::is_same_v<ReturnType, void>)
|
||||||
throw ParsingException(std::string("Cannot parse IPv4 ") + s, ErrorCodes::CANNOT_PARSE_IPV4);
|
throw ParsingException(std::string("Cannot parse IPv4 ") + s, ErrorCodes::CANNOT_PARSE_IPV4);
|
||||||
else
|
else
|
||||||
@ -897,7 +898,8 @@ inline ReturnType readIPv6TextImpl(IPv6 & ip, ReadBuffer & buf)
|
|||||||
char s[40];
|
char s[40];
|
||||||
size_t size = buf.read(s, sizeof(s));
|
size_t size = buf.read(s, sizeof(s));
|
||||||
|
|
||||||
auto ret_false = [&]() {
|
auto ret_false = [&]()
|
||||||
|
{
|
||||||
if constexpr (std::is_same_v<ReturnType, void>)
|
if constexpr (std::is_same_v<ReturnType, void>)
|
||||||
throw ParsingException(std::string("Cannot parse IPv6 ") + s, ErrorCodes::CANNOT_PARSE_IPV6);
|
throw ParsingException(std::string("Cannot parse IPv6 ") + s, ErrorCodes::CANNOT_PARSE_IPV6);
|
||||||
else
|
else
|
||||||
@ -909,7 +911,7 @@ inline ReturnType readIPv6TextImpl(IPv6 & ip, ReadBuffer & buf)
|
|||||||
|
|
||||||
if (parseIPv6(s, reinterpret_cast<unsigned char *>(ip.toUnderType().items)))
|
if (parseIPv6(s, reinterpret_cast<unsigned char *>(ip.toUnderType().items)))
|
||||||
return ReturnType(true);
|
return ReturnType(true);
|
||||||
|
|
||||||
return ret_false();
|
return ret_false();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -41,7 +41,8 @@ void formatUUID(std::reverse_iterator<const UInt8 *> src16, UInt8 * dst36)
|
|||||||
namespace detail
|
namespace detail
|
||||||
{
|
{
|
||||||
template <unsigned... digits>
|
template <unsigned... digits>
|
||||||
struct ToChars {
|
struct ToChars
|
||||||
|
{
|
||||||
static const char value[];
|
static const char value[];
|
||||||
static const size_t size;
|
static const size_t size;
|
||||||
};
|
};
|
||||||
|
Loading…
Reference in New Issue
Block a user