diff options
Diffstat (limited to '')
-rw-r--r-- | src/net/StaticSocketAddress.cxx | 7 | ||||
-rw-r--r-- | src/net/StaticSocketAddress.hxx | 6 |
2 files changed, 4 insertions, 9 deletions
diff --git a/src/net/StaticSocketAddress.cxx b/src/net/StaticSocketAddress.cxx index 27de7f6f5..94db4a49c 100644 --- a/src/net/StaticSocketAddress.cxx +++ b/src/net/StaticSocketAddress.cxx @@ -41,10 +41,3 @@ StaticSocketAddress::operator=(SocketAddress other) memcpy(&address, other.GetAddress(), size); return *this; } - -bool -StaticSocketAddress::operator==(const StaticSocketAddress &other) const -{ - return size == other.size && - memcmp(&address, &other.address, size) == 0; -} diff --git a/src/net/StaticSocketAddress.hxx b/src/net/StaticSocketAddress.hxx index 0a780f6f6..c8cef9dfe 100644 --- a/src/net/StaticSocketAddress.hxx +++ b/src/net/StaticSocketAddress.hxx @@ -92,9 +92,11 @@ public: } gcc_pure - bool operator==(const StaticSocketAddress &other) const; + bool operator==(SocketAddress other) const { + return (SocketAddress)*this == other; + } - bool operator!=(const StaticSocketAddress &other) const { + bool operator!=(SocketAddress &other) const { return !(*this == other); } }; |