]> git.saurik.com Git - wxWidgets.git/commitdiff
Applied patch [ 842285 ] comparison for wxIPV4address
authorJulian Smart <julian@anthemion.co.uk>
Sun, 11 Jan 2004 14:22:36 +0000 (14:22 +0000)
committerJulian Smart <julian@anthemion.co.uk>
Sun, 11 Jan 2004 14:22:36 +0000 (14:22 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@25117 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

include/wx/sckaddr.h
src/common/sckaddr.cpp

index fb165f0885a697df9f39db462f611a216297ff5a..bd37455fcc7b99db57adf4547c014b5e1ff3b25c 100644 (file)
@@ -73,6 +73,8 @@ public:
 
   virtual int Type() { return wxSockAddress::IPV4; }
   virtual wxSockAddress *Clone() const;
+  
+  bool operator==(wxIPV4address& addr);
 
 private:
   wxString m_origHostname;
index 33b51d153d4db502e9739307b9e9734e36d7a2b8..8f667937dc82057736a9f2725ed021c94622e437 100644 (file)
@@ -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