X-Git-Url: https://git.stg.codes/stg.git/blobdiff_plain/0907aa4037b12b6b88ee24495d4577a064d4f8db..1c324d5b2380a68f209e65969079677dbaf1c511:/projects/stargazer/plugins/configuration/sgconfig/conn.h?ds=inline diff --git a/projects/stargazer/plugins/configuration/sgconfig/conn.h b/projects/stargazer/plugins/configuration/sgconfig/conn.h index c96be90b..a98e593b 100644 --- a/projects/stargazer/plugins/configuration/sgconfig/conn.h +++ b/projects/stargazer/plugins/configuration/sgconfig/conn.h @@ -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()); }