Make server getters const

This commit is contained in:
sgourdas 2024-09-17 14:25:09 +03:00
parent 8930095c52
commit 02ab2ce5a5
3 changed files with 6 additions and 6 deletions

View File

@ -64,8 +64,8 @@ namespace kiwix
void setBlockExternalLinks(bool blockExternalLinks)
{ m_blockExternalLinks = blockExternalLinks; }
void setIpMode(IpMode mode) { m_ipMode = mode; }
int getPort();
std::string getAddress();
int getPort() const;
std::string getAddress() const;
IpMode getIpMode() const;
protected:

View File

@ -75,12 +75,12 @@ void Server::setRoot(const std::string& root)
}
}
int Server::getPort()
int Server::getPort() const
{
return mp_server->getPort();
}
std::string Server::getAddress()
std::string Server::getAddress() const
{
return mp_server->getAddress();
}

View File

@ -117,8 +117,8 @@ class InternalServer {
void** cont_cls);
bool start();
void stop();
std::string getAddress() { return m_addr; }
int getPort() { return m_port; }
std::string getAddress() const { return m_addr; }
int getPort() const { return m_port; }
IpMode getIpMode() const { return m_ipMode; }
private: // functions