mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-11-14 19:45:11 +00:00
updateFrame returns size_t
This commit is contained in:
parent
ae98847d31
commit
e8ebd2e845
@ -107,12 +107,12 @@ private:
|
|||||||
bool specified_min_max_x;
|
bool specified_min_max_x;
|
||||||
|
|
||||||
template <class T>
|
template <class T>
|
||||||
int updateFrame(ColumnString::Chars & frame, const T value) const
|
size_t updateFrame(ColumnString::Chars & frame, const T value) const
|
||||||
{
|
{
|
||||||
static const String bars[9] = {" ", "▁", "▂", "▃", "▄", "▅", "▆", "▇", "█"};
|
static const String bars[9] = {" ", "▁", "▂", "▃", "▄", "▅", "▆", "▇", "█"};
|
||||||
const auto & bar = (isNaN(value) || value > 8 || value < 1) ? bars[0] : bars[static_cast<UInt8>(value)];
|
const auto & bar = (isNaN(value) || value > 8 || value < 1) ? bars[0] : bars[static_cast<UInt8>(value)];
|
||||||
frame.insert(bar.begin(), bar.end());
|
frame.insert(bar.begin(), bar.end());
|
||||||
return static_cast<int>(bar.size());
|
return bar.size();
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
Loading…
Reference in New Issue
Block a user