mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-11-21 15:12:02 +00:00
Implemented some suggestions from clang-tidy (part 2) [#CLICKHOUSE-3301].
This commit is contained in:
parent
abad3f432d
commit
d19d9f8589
@ -284,7 +284,7 @@ protected:
|
||||
column = cloneEmpty();
|
||||
|
||||
{
|
||||
size_t reserve_size = num_rows / num_columns * 1.1; /// 1.1 is just a guess. Better to use n-sigma rule.
|
||||
size_t reserve_size = num_rows * 1.1 / num_columns; /// 1.1 is just a guess. Better to use n-sigma rule.
|
||||
|
||||
if (reserve_size > 1)
|
||||
for (auto & column : columns)
|
||||
|
@ -167,7 +167,7 @@ struct SettingSeconds
|
||||
SettingSeconds(UInt64 seconds = 0) : value(seconds, 0) {}
|
||||
|
||||
operator Poco::Timespan() const { return value; }
|
||||
SettingSeconds & operator= (Poco::Timespan x) { set(x); return *this; }
|
||||
SettingSeconds & operator= (const Poco::Timespan & x) { set(x); return *this; }
|
||||
|
||||
Poco::Timespan::TimeDiff totalSeconds() const { return value.totalSeconds(); }
|
||||
|
||||
@ -176,7 +176,7 @@ struct SettingSeconds
|
||||
return DB::toString(totalSeconds());
|
||||
}
|
||||
|
||||
void set(Poco::Timespan x)
|
||||
void set(const Poco::Timespan & x)
|
||||
{
|
||||
value = x;
|
||||
changed = true;
|
||||
|
@ -25,7 +25,7 @@ void printStat(const zkutil::Stat & s)
|
||||
std::cout << " pzxid: " << s.pzxid << std::endl;
|
||||
}
|
||||
|
||||
void waitForWatch(zkutil::EventPtr event)
|
||||
void waitForWatch(const zkutil::EventPtr & event)
|
||||
{
|
||||
std::cout << "waiting for watch" << std::endl;
|
||||
event->wait();
|
||||
|
Loading…
Reference in New Issue
Block a user