From 1d6d8b5de0b037674f38eeddb72e688dc81206ff Mon Sep 17 00:00:00 2001 From: Julian Smart Date: Sun, 11 Jan 2004 14:22:36 +0000 Subject: [PATCH] Applied patch [ 842285 ] comparison for wxIPV4address git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@25117 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- include/wx/sckaddr.h | 2 ++ src/common/sckaddr.cpp | 6 ++++++ 2 files changed, 8 insertions(+) diff --git a/include/wx/sckaddr.h b/include/wx/sckaddr.h index fb165f0885..bd37455fcc 100644 --- a/include/wx/sckaddr.h +++ b/include/wx/sckaddr.h @@ -73,6 +73,8 @@ public: virtual int Type() { return wxSockAddress::IPV4; } virtual wxSockAddress *Clone() const; + + bool operator==(wxIPV4address& addr); private: wxString m_origHostname; diff --git a/src/common/sckaddr.cpp b/src/common/sckaddr.cpp index 33b51d153d..8f667937dc 100644 --- a/src/common/sckaddr.cpp +++ b/src/common/sckaddr.cpp @@ -193,6 +193,12 @@ wxString wxIPV4address::IPAddress() const ); } +bool wxIPV4address::operator==(wxIPV4address& addr) +{ + if(Hostname().Cmp(addr.Hostname().c_str()) == 0 && Service() == addr.Service()) return true; + return false; +} + #if 0 // --------------------------------------------------------------------------- // wxIPV6address -- 2.45.2