diff options
author | Max Kellermann <max@duempel.org> | 2015-07-22 10:54:17 +0200 |
---|---|---|
committer | Max Kellermann <max@duempel.org> | 2015-07-22 10:56:32 +0200 |
commit | 20d69b957f44b07dac13f140d35684810e34a301 (patch) | |
tree | 7beef1bc3b7db267ca97f445433f8d54d415b0b1 /src/net/StaticSocketAddress.hxx | |
parent | 7de0a621e3a33b25a62d875670380d33dbd977f5 (diff) | |
download | mpd-20d69b957f44b07dac13f140d35684810e34a301.tar.gz mpd-20d69b957f44b07dac13f140d35684810e34a301.tar.xz mpd-20d69b957f44b07dac13f140d35684810e34a301.zip |
Net/StaticSocketAddress: add equality operator with SocketAddress
Diffstat (limited to 'src/net/StaticSocketAddress.hxx')
-rw-r--r-- | src/net/StaticSocketAddress.hxx | 6 |
1 files changed, 4 insertions, 2 deletions
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); } }; |