mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-09-24 18:50: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);
|
||||
else if (x[0] == '1')
|
||||
set(true);
|
||||
else
|
||||
throw Exception("Cannot parse bool from string '" + x + "'", ErrorCodes::CANNOT_PARSE_BOOL);
|
||||
}
|
||||
else
|
||||
{
|
||||
@ -84,9 +82,9 @@ void SettingNumber<bool>::set(const String & x)
|
||||
set(true);
|
||||
else if (checkStringCaseInsensitive("false", buf))
|
||||
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>
|
||||
|
Loading…
Reference in New Issue
Block a user