summaryrefslogtreecommitdiff
path: root/src/network/core/address.cpp
diff options
context:
space:
mode:
authorrubidium <rubidium@openttd.org>2009-04-02 20:39:30 +0000
committerrubidium <rubidium@openttd.org>2009-04-02 20:39:30 +0000
commitc5160c7c8e80b1b64bf474ec1d2a54c2bcef690b (patch)
treea76360971db13f30d480449e26cf22d898d0a178 /src/network/core/address.cpp
parent1e205e01b83ac995c14105e0eb1f992cbd3e0625 (diff)
downloadopenttd-c5160c7c8e80b1b64bf474ec1d2a54c2bcef690b.tar.xz
(svn r15917) -Codechange: remove the latest traces of NetworkAddress::GetIP.
Diffstat (limited to 'src/network/core/address.cpp')
-rw-r--r--src/network/core/address.cpp16
1 files changed, 4 insertions, 12 deletions
diff --git a/src/network/core/address.cpp b/src/network/core/address.cpp
index a29640056..888625dc1 100644
--- a/src/network/core/address.cpp
+++ b/src/network/core/address.cpp
@@ -21,17 +21,6 @@ const char *NetworkAddress::GetHostname()
return this->hostname;
}
-uint32 NetworkAddress::GetIP()
-{
- assert(this->address.ss_family == AF_INET);
-
- if (!this->resolved) {
- ((struct sockaddr_in *)&this->address)->sin_addr.s_addr = NetworkResolveHost(this->hostname);
- this->resolved = true;
- }
- return ((struct sockaddr_in *)&this->address)->sin_addr.s_addr;
-}
-
uint16 NetworkAddress::GetPort() const
{
switch (this->address.ss_family) {
@@ -66,7 +55,10 @@ const char *NetworkAddress::GetAddressAsString()
const sockaddr_storage *NetworkAddress::GetAddress()
{
- if (!this->resolved) this->GetIP();
+ if (!this->resolved) {
+ ((struct sockaddr_in *)&this->address)->sin_addr.s_addr = NetworkResolveHost(this->hostname);
+ this->resolved = true;
+ }
return &this->address;
}