X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/22d080f35b173d2a855078d11e6b142b4e6d79a7..718e35a651487b43ab21b15f0bbdf5318c3cad1f:/include/wx/list.h diff --git a/include/wx/list.h b/include/wx/list.h index 6be233d821..80353b3fdb 100644 --- a/include/wx/list.h +++ b/include/wx/list.h @@ -166,7 +166,7 @@ enum wxKeyType return it; \ } \ public: \ - liT() {}; \ + liT() {} \ \ citer Append( elT e ) { push_back( e ); return GetLast(); } \ void Clear() { clear(); } \ @@ -371,7 +371,7 @@ private: // a double-linked list class // ----------------------------------------------------------------------------- -class wxList; +class WXDLLIMPEXP_BASE wxList; class WXDLLIMPEXP_BASE wxListBase : public wxObject { @@ -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(); } \