From 00e092707bbb33d4a45a2697b770769b0750ef53 Mon Sep 17 00:00:00 2001 From: Vadim Zeitlin Date: Sun, 25 Jul 2004 15:59:23 +0000 Subject: [PATCH] fixed wxList copy ctor (patch 985473) git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@28478 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- include/wx/list.h | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/include/wx/list.h b/include/wx/list.h index c4e483ecd7..80353b3fdb 100644 --- a/include/wx/list.h +++ b/include/wx/list.h @@ -446,11 +446,8 @@ public: wxListBase(void *object, ... /* terminate with NULL */); protected: - // copy ctor and assignment operator - wxListBase(const wxListBase& list) : wxObject() - { Init(); DoCopy(list); } - wxListBase& operator=(const wxListBase& list) - { Clear(); DoCopy(list); return *this; } + void Assign(const wxListBase& list) + { Clear(); DoCopy(list); } // get list head/tail wxNodeBase *GetFirst() const { return m_nodeFirst; } @@ -604,11 +601,13 @@ private: \ name(wxKeyType keyType = wxKEY_NONE) : wxListBase(keyType) \ { } \ + name(const name& list) : wxListBase(list.GetKeyType()) \ + { Assign(list); } \ name(size_t count, T *elements[]) \ : wxListBase(count, (void **)elements) { } \ \ name& operator=(const name& list) \ - { (void) wxListBase::operator=(list); return *this; } \ + { Assign(list); return *this; } \ \ nodetype *GetFirst() const \ { return (nodetype *)wxListBase::GetFirst(); } \ -- 2.45.2