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) void setBlockExternalLinks(bool blockExternalLinks)
{ m_blockExternalLinks = blockExternalLinks; } { m_blockExternalLinks = blockExternalLinks; }
void setIpMode(IpMode mode) { m_ipMode = mode; } void setIpMode(IpMode mode) { m_ipMode = mode; }
int getPort(); int getPort() const;
std::string getAddress(); std::string getAddress() const;
IpMode getIpMode() const; IpMode getIpMode() const;
protected: 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(); return mp_server->getPort();
} }
std::string Server::getAddress() std::string Server::getAddress() const
{ {
return mp_server->getAddress(); return mp_server->getAddress();
} }

View File

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