Pass connection_host by ref

This commit is contained in:
Konstantin Bogdanov 2024-05-06 02:34:51 +02:00
parent 4356fafa5c
commit daec6912bb
Signed by: thevar1able
GPG Key ID: DB399448D9FE52F1
2 changed files with 2 additions and 2 deletions

View File

@ -143,7 +143,7 @@ ConnectionParameters::ConnectionParameters(const Poco::Util::AbstractConfigurati
}
UInt16 ConnectionParameters::getPortFromConfig(const Poco::Util::AbstractConfiguration & config,
std::string connection_host)
std::string & connection_host)
{
bool is_secure = enableSecureConnection(config, connection_host);
return config.getInt("port",

View File

@ -31,7 +31,7 @@ struct ConnectionParameters
ConnectionParameters(const Poco::Util::AbstractConfiguration & config, std::string host);
ConnectionParameters(const Poco::Util::AbstractConfiguration & config, std::string host, std::optional<UInt16> port);
static UInt16 getPortFromConfig(const Poco::Util::AbstractConfiguration & config, String connection_host);
static UInt16 getPortFromConfig(const Poco::Util::AbstractConfiguration & config, std::string & connection_host);
/// Ask to enter the user's password if password option contains this value.
/// "\n" is used because there is hardly a chance that a user would use '\n' as password.