diff options
author | rubidium <rubidium@openttd.org> | 2011-11-12 08:10:22 +0000 |
---|---|---|
committer | rubidium <rubidium@openttd.org> | 2011-11-12 08:10:22 +0000 |
commit | bd64bf6372399bad1a92565ae7d3c243658d241f (patch) | |
tree | 7af646337e5ddafe68f0d701711c41ef89d21491 /src/network/core/address.cpp | |
parent | a8d33a4d89f11c45b9690481b08df3c800292005 (diff) | |
download | openttd-bd64bf6372399bad1a92565ae7d3c243658d241f.tar.xz |
(svn r23193) -Codechange: don't cast away const unneededly
Diffstat (limited to 'src/network/core/address.cpp')
-rw-r--r-- | src/network/core/address.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/network/core/address.cpp b/src/network/core/address.cpp index 371f53403..3b3c9f4aa 100644 --- a/src/network/core/address.cpp +++ b/src/network/core/address.cpp @@ -39,10 +39,10 @@ uint16 NetworkAddress::GetPort() const switch (this->address.ss_family) { case AF_UNSPEC: case AF_INET: - return ntohs(((struct sockaddr_in *)&this->address)->sin_port); + return ntohs(((const struct sockaddr_in *)&this->address)->sin_port); case AF_INET6: - return ntohs(((struct sockaddr_in6 *)&this->address)->sin6_port); + return ntohs(((const struct sockaddr_in6 *)&this->address)->sin6_port); default: NOT_REACHED(); |