X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/f6bcfd974ef26faf6f91a62cac09827e09463fd1..0b165ed6b209ea9f5ddd7bfb1813c6f0718a9a3d:/include/wx/list.h?ds=sidebyside diff --git a/include/wx/list.h b/include/wx/list.h index d475c569b4..7b542c64a2 100644 --- a/include/wx/list.h +++ b/include/wx/list.h @@ -187,6 +187,9 @@ class WXDLLEXPORT wxListBase : public wxObject { friend class wxNodeBase; // should be able to call DetachNode() friend class wxHashTableBase; // should be able to call untyped Find() +private: + // common part of all ctors + void Init(wxKeyType keyType = wxKEY_NONE); // Must be declared before it's used (for VC++ 1.5) public: // default ctor & dtor wxListBase(wxKeyType keyType = wxKEY_NONE) { Init(keyType); } @@ -247,7 +250,7 @@ public: protected: // copy ctor and assignment operator wxListBase(const wxListBase& list) - { DoCopy(list); } + { Init(); DoCopy(list); } wxListBase& operator=(const wxListBase& list) { Clear(); DoCopy(list); return *this; } @@ -308,8 +311,6 @@ protected: private: // helpers - // common part of all ctors - void Init(wxKeyType keyType = wxKEY_NONE); // common part of copy ctor and assignment operator void DoCopy(const wxListBase& list); // common part of all Append()s @@ -484,6 +485,9 @@ class WXDLLEXPORT wxList : public wxObjectList { public: wxList(int key_type = wxKEY_NONE) : wxObjectList((wxKeyType)key_type) { } +#ifdef __DARWIN__ + ~wxList() { } +#endif wxList& operator=(const wxList& list) { return (wxList&)wxListBase::operator=(list); }