summaryrefslogtreecommitdiff
path: root/src/network/core/address.h
diff options
context:
space:
mode:
authorrubidium <rubidium@openttd.org>2009-04-15 20:37:00 +0000
committerrubidium <rubidium@openttd.org>2009-04-15 20:37:00 +0000
commitd04ebf2fa5a894f14430d9dc059167140589956f (patch)
tree733a4607c46d51bc86a86445fc533685e2b3329c /src/network/core/address.h
parent3061d70387f48a4687688b8dc8fa6e34f4a80b85 (diff)
downloadopenttd-d04ebf2fa5a894f14430d9dc059167140589956f.tar.xz
(svn r16065) -Fix: don't readd (and resolve) the last joined server each time the window gets repainted
Diffstat (limited to 'src/network/core/address.h')
-rw-r--r--src/network/core/address.h8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/network/core/address.h b/src/network/core/address.h
index 212164c9d..863c43427 100644
--- a/src/network/core/address.h
+++ b/src/network/core/address.h
@@ -179,7 +179,7 @@ public:
* @param address the other address.
* @return < 0 if address is less, 0 if equal and > 0 if address is more
*/
- int CompareTo(NetworkAddress address)
+ int CompareTo(NetworkAddress &address)
{
int r = this->GetAddressLength() - address.GetAddressLength();
if (r == 0) r = this->address.ss_family - address.address.ss_family;
@@ -193,7 +193,7 @@ public:
* @param address the other address.
* @return true if both match.
*/
- bool operator == (NetworkAddress address)
+ bool operator == (NetworkAddress &address)
{
return this->CompareTo(address) == 0;
}
@@ -203,7 +203,7 @@ public:
* @param address the other address.
* @return true if both match.
*/
- bool operator == (NetworkAddress address) const
+ bool operator == (NetworkAddress &address) const
{
return const_cast<NetworkAddress*>(this)->CompareTo(address) == 0;
}
@@ -212,7 +212,7 @@ public:
* Compare the address of this class with the address of another.
* @param address the other address.
*/
- bool operator < (NetworkAddress address)
+ bool operator < (NetworkAddress &address)
{
return this->CompareTo(address) < 0;
}