mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-09-25 03:00:49 +00:00
Less branches
This commit is contained in:
parent
7c37450c3d
commit
ca3796f0a3
@ -74,8 +74,6 @@ void SettingNumber<bool>::set(const String & x)
|
|||||||
set(false);
|
set(false);
|
||||||
else if (x[0] == '1')
|
else if (x[0] == '1')
|
||||||
set(true);
|
set(true);
|
||||||
else
|
|
||||||
throw Exception("Cannot parse bool from string '" + x + "'", ErrorCodes::CANNOT_PARSE_BOOL);
|
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@ -84,9 +82,9 @@ void SettingNumber<bool>::set(const String & x)
|
|||||||
set(true);
|
set(true);
|
||||||
else if (checkStringCaseInsensitive("false", buf))
|
else if (checkStringCaseInsensitive("false", buf))
|
||||||
set(false);
|
set(false);
|
||||||
else
|
|
||||||
throw Exception("Cannot parse bool from string '" + x + "'", ErrorCodes::CANNOT_PARSE_BOOL);
|
|
||||||
}
|
}
|
||||||
|
if (!changed)
|
||||||
|
throw Exception("Cannot parse bool from string '" + x + "'", ErrorCodes::CANNOT_PARSE_BOOL);
|
||||||
}
|
}
|
||||||
|
|
||||||
template <typename Type>
|
template <typename Type>
|
||||||
|
Loading…
Reference in New Issue
Block a user