Implemented some suggestions from clang-tidy (part 2) [#CLICKHOUSE-3301].

This commit is contained in:
Alexey Milovidov 2017-09-08 05:37:02 +03:00
parent abad3f432d
commit d19d9f8589
3 changed files with 4 additions and 4 deletions

View File

@ -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)

View File

@ -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;

View File

@ -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();