clang-tidy, part 23

This commit is contained in:
Alexey Milovidov 2020-03-09 06:41:03 +03:00
parent 66582d69a5
commit 7c188b8479
3 changed files with 7 additions and 9 deletions

View File

@ -112,7 +112,7 @@ namespace ErrorCodes
class Client : public Poco::Util::Application
{
public:
Client() {}
Client() = default;
private:
using StringSet = std::unordered_set<String>;
@ -353,10 +353,8 @@ private:
return false;
auto days = DateLUT::instance().toDayNum(current_time).toUnderType();
for (auto i = 0ul; i < N; ++i)
for (auto d : chineseNewYearIndicators)
{
auto d = chineseNewYearIndicators[i];
/// Let's celebrate until Lantern Festival
if (d <= days && d + 25u >= days)
return true;
@ -645,7 +643,7 @@ private:
}
inline const String prompt() const
inline String prompt() const
{
return boost::replace_all_copy(prompt_by_server_display_name, "{database}", config().getString("database", "default"));
}

View File

@ -698,7 +698,7 @@ int Server::main(const std::vector<std::string> & /*args*/)
return socket_address;
};
auto socket_bind_listen = [&](auto & socket, const std::string & host, UInt16 port, [[maybe_unused]] bool secure = 0)
auto socket_bind_listen = [&](auto & socket, const std::string & host, UInt16 port, [[maybe_unused]] bool secure = false)
{
auto address = make_socket_address(host, port);
#if !defined(POCO_CLICKHOUSE_PATCH) || POCO_VERSION < 0x01090100

View File

@ -157,8 +157,8 @@ private:
void receiveQuery();
bool receiveData(bool scalar);
bool readDataNext(const size_t & poll_interval, const int & receive_timeout);
void readData(const Settings & global_settings);
std::tuple<size_t, int> getReadTimeouts(const Settings & global_settings);
void readData(const Settings & connection_settings);
std::tuple<size_t, int> getReadTimeouts(const Settings & connection_settings);
[[noreturn]] void receiveUnexpectedData();
[[noreturn]] void receiveUnexpectedQuery();
@ -166,7 +166,7 @@ private:
[[noreturn]] void receiveUnexpectedTablesStatusRequest();
/// Process INSERT query
void processInsertQuery(const Settings & global_settings);
void processInsertQuery(const Settings & connection_settings);
/// Process a request that does not require the receiving of data blocks from the client
void processOrdinaryQuery();