From 163f315474dbed303b55fa7bf1d98651741164ec Mon Sep 17 00:00:00 2001 From: Vadim Zeitlin Date: Wed, 21 Nov 2001 17:25:08 +0000 Subject: [PATCH] replaced wxSocketEvent::CopyObject() with Clone() git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@12561 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- include/wx/socket.h | 11 +++++++---- src/common/socket.cpp | 19 ------------------- 2 files changed, 7 insertions(+), 23 deletions(-) diff --git a/include/wx/socket.h b/include/wx/socket.h index 4374b9b1d1..aa1452743f 100644 --- a/include/wx/socket.h +++ b/include/wx/socket.h @@ -323,10 +323,11 @@ public: class WXDLLEXPORT wxSocketEvent : public wxEvent { - DECLARE_DYNAMIC_CLASS(wxSocketEvent) - public: - wxSocketEvent(int id = 0); + wxSocketEvent(int id = 0) + : wxEvent(id, wxEVT_SOCKET) + { + } wxSocketNotify GetSocketEvent() const { return m_event; } wxSocketBase *GetSocket() const { return (wxSocketBase *) GetEventObject(); } @@ -338,11 +339,13 @@ public: wxSocketBase *Socket() const { return (wxSocketBase *) GetEventObject(); } #endif // WXWIN_COMPATIBILITY_2 - void CopyObject(wxObject& object_dest) const; + virtual wxEvent *Clone() const { return new wxSocketEvent(*this); } public: wxSocketNotify m_event; void *m_clientData; + + DECLARE_DYNAMIC_CLASS(wxSocketEvent) }; diff --git a/src/common/socket.cpp b/src/common/socket.cpp index 7ec0743ec1..003bd9dbcf 100644 --- a/src/common/socket.cpp +++ b/src/common/socket.cpp @@ -1235,25 +1235,6 @@ wxDatagramSocket& wxDatagramSocket::SendTo( wxSockAddress& addr, return (*this); } -// ========================================================================== -// wxSocketEvent -// ========================================================================== - -wxSocketEvent::wxSocketEvent(int id) : wxEvent(id) -{ - SetEventType( (wxEventType)wxEVT_SOCKET ); -} - -void wxSocketEvent::CopyObject(wxObject& object_dest) const -{ - wxSocketEvent *event = (wxSocketEvent *)&object_dest; - - wxEvent::CopyObject(object_dest); - - event->m_event = m_event; - event->m_clientData = m_clientData; -} - // ========================================================================== // wxSocketModule // ==========================================================================