mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-11-21 15:12:02 +00:00
Fix clang-tidy in some headers
This commit is contained in:
parent
8a272ffd8f
commit
3b18eb4f17
@ -10,7 +10,7 @@
|
||||
|
||||
# TODO Let clang-tidy check headers in further directories
|
||||
# --> HeaderFilterRegex: '^.*/(src|base|programs|utils)/.*(h|hpp)$'
|
||||
HeaderFilterRegex: '^.*/(base)/.*(h|hpp)$'
|
||||
HeaderFilterRegex: '^.*/(base|programs|utils)/.*(h|hpp)$'
|
||||
|
||||
Checks: '*,
|
||||
-abseil-*,
|
||||
|
@ -102,7 +102,7 @@ struct TaskStateWithOwner
|
||||
return TaskStateWithOwner(state, owner).toString();
|
||||
}
|
||||
|
||||
String toString()
|
||||
String toString() const
|
||||
{
|
||||
WriteBufferFromOwnString wb;
|
||||
wb << static_cast<UInt32>(state) << "\n" << escape << owner;
|
||||
|
@ -40,7 +40,6 @@ public:
|
||||
|
||||
explicit ConnectionHolder(const String & connection_string_)
|
||||
: pool(nullptr)
|
||||
, connection()
|
||||
, connection_string(connection_string_)
|
||||
{
|
||||
updateConnection();
|
||||
@ -143,7 +142,7 @@ public:
|
||||
{
|
||||
std::lock_guard lock(mutex);
|
||||
|
||||
if (!factory.count(connection_string))
|
||||
if (!factory.contains(connection_string))
|
||||
factory.emplace(std::make_pair(connection_string, std::make_shared<nanodbc::Pool>(pool_size)));
|
||||
|
||||
auto & pool = factory[connection_string];
|
||||
|
@ -184,7 +184,7 @@ static bool jemallocOptionEnabled(const char *name)
|
||||
return value;
|
||||
}
|
||||
#else
|
||||
static bool jemallocOptionEnabled(const char *) { return 0; }
|
||||
static bool jemallocOptionEnabled(const char *) { return false; }
|
||||
#endif
|
||||
|
||||
int mainEntryClickHouseServer(int argc, char ** argv)
|
||||
|
@ -15,8 +15,6 @@
|
||||
|
||||
namespace DB
|
||||
{
|
||||
namespace fs = std::filesystem;
|
||||
|
||||
namespace ErrorCodes
|
||||
{
|
||||
extern const int BAD_ARGUMENTS;
|
||||
@ -65,13 +63,13 @@ void registerBackupEngineS3(BackupFactory & factory)
|
||||
secret_access_key = config.getString(config_prefix + ".secret_access_key", "");
|
||||
|
||||
if (config.has(config_prefix + ".filename"))
|
||||
s3_uri = fs::path(s3_uri) / config.getString(config_prefix + ".filename");
|
||||
s3_uri = std::filesystem::path(s3_uri) / config.getString(config_prefix + ".filename");
|
||||
|
||||
if (args.size() > 1)
|
||||
throw Exception(ErrorCodes::NUMBER_OF_ARGUMENTS_DOESNT_MATCH, "Backup S3 requires 1 or 2 arguments: named_collection, [filename]");
|
||||
|
||||
if (args.size() == 1)
|
||||
s3_uri = fs::path(s3_uri) / args[0].safeGet<String>();
|
||||
s3_uri = std::filesystem::path(s3_uri) / args[0].safeGet<String>();
|
||||
}
|
||||
else
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user