mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-11-26 09:32:01 +00:00
Fix clang-tidy
This commit is contained in:
parent
5e7a8245c4
commit
a905b24f75
@ -125,7 +125,7 @@ void Chunk::addColumn(size_t position, ColumnPtr column)
|
||||
if (position >= columns.size())
|
||||
throw Exception(ErrorCodes::POSITION_OUT_OF_BOUND,
|
||||
"Position {} out of bound in Chunk::addColumn(), max position = {}",
|
||||
position, columns.size() ? columns.size() - 1 : 0);
|
||||
position, !columns.empty() ? columns.size() - 1 : 0);
|
||||
if (empty())
|
||||
num_rows = column->size();
|
||||
else if (column->size() != num_rows)
|
||||
@ -143,7 +143,7 @@ void Chunk::erase(size_t position)
|
||||
|
||||
if (position >= columns.size())
|
||||
throw Exception(ErrorCodes::POSITION_OUT_OF_BOUND, "Position {} out of bound in Chunk::erase(), max position = {}",
|
||||
toString(position), toString(columns.size() ? columns.size() - 1 : 0));
|
||||
toString(position), toString(!columns.empty() ? columns.size() - 1 : 0));
|
||||
|
||||
columns.erase(columns.begin() + position);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user