X-Git-Url: https://git.stg.codes/stg.git/blobdiff_plain/8e80bb9cec2c90dd61f810fb1525932a434288eb..2196a3a0cdc5384c082febb7f4aa5994cc7d80db:/projects/stargazer/plugins/configuration/sgconfig/conn.h diff --git a/projects/stargazer/plugins/configuration/sgconfig/conn.h b/projects/stargazer/plugins/configuration/sgconfig/conn.h index c96be90b..c2997559 100644 --- a/projects/stargazer/plugins/configuration/sgconfig/conn.h +++ b/projects/stargazer/plugins/configuration/sgconfig/conn.h @@ -39,9 +39,9 @@ namespace STG struct Settings; struct Admins; -struct Users; -struct Tariffs; -struct Admin; +class Users; +class Tariffs; +class Admin; class PluginLogger; class DECRYPT_STREAM; @@ -60,7 +60,7 @@ class Conn ~Conn(); int Sock() const { return m_sock; } - uint32_t IP() const { return *(uint32_t *)(&m_addr.sin_addr); } + uint32_t IP() const { return *reinterpret_cast(&m_addr.sin_addr); } uint16_t Port() const { return ntohs(m_addr.sin_port); } std::string endpoint() const { return inet_ntostring(IP()) + ":" + std::to_string(Port()); }