Fix style, build

This commit is contained in:
kssenii 2021-03-17 20:49:56 +00:00
parent 3903d59d30
commit 7847b78af9
4 changed files with 2 additions and 10 deletions

View File

@ -45,7 +45,7 @@ private:
ConnectionPtr connection;
std::string connection_str, address;
std::atomic<uint8_t> ref_count;
std::atomic<uint8_t> ref_count{0};
};
using PostgreSQLConnectionPtr = std::shared_ptr<PostgreSQLConnection>;

View File

@ -50,7 +50,6 @@ void PostgreSQLConnectionPool::initialize()
}
WrappedPostgreSQLConnection PostgreSQLConnectionPool::get()
{
std::lock_guard lock(mutex);

View File

@ -52,13 +52,6 @@ PostgreSQLReplicaConnection::PostgreSQLReplicaConnection(
}
PostgreSQLReplicaConnection::PostgreSQLReplicaConnection(const PostgreSQLReplicaConnection & other)
: replicas(other.replicas)
, num_retries(other.num_retries)
{
}
WrappedPostgreSQLConnection PostgreSQLReplicaConnection::get()
{
for (size_t i = 0; i < num_retries; ++i)

View File

@ -19,7 +19,7 @@ public:
const String & config_prefix,
const size_t num_retries_ = POSTGRESQL_CONNECTION_DEFAULT_RETRIES_NUM);
PostgreSQLReplicaConnection(const PostgreSQLReplicaConnection & other);
PostgreSQLReplicaConnection(const PostgreSQLReplicaConnection & other) = default;
WrappedPostgreSQLConnection get();