X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/7daab4530c80677c34eb557b722bb8aa5cd8d517..0fe5e8fea017ecb73f8aaa8ceb745feb269b3f79:/src/common/list.cpp diff --git a/src/common/list.cpp b/src/common/list.cpp index fc55b174fa..e94aa517a8 100644 --- a/src/common/list.cpp +++ b/src/common/list.cpp @@ -171,8 +171,8 @@ void wxListBase::DoCopy(const wxListBase& list) m_nodeFirst = m_nodeLast = (wxNodeBase *) NULL; - switch (m_keyType) { - + switch (m_keyType) + { case wxKEY_INTEGER: { long key; @@ -532,10 +532,18 @@ void wxListBase::Sort(const wxSortCompareFunction compfunc) delete[] objArray; } +// ============================================================================ +// compatibility section from now on +// ============================================================================ + +#ifdef wxLIST_COMPATIBILITY + // ----------------------------------------------------------------------------- // wxList (a.k.a. wxObjectList) // ----------------------------------------------------------------------------- +IMPLEMENT_DYNAMIC_CLASS(wxList, wxObject) + void wxObjectListNode::DeleteData() { delete (wxObject *)GetData(); @@ -545,6 +553,8 @@ void wxObjectListNode::DeleteData() // wxStringList // ----------------------------------------------------------------------------- +IMPLEMENT_DYNAMIC_CLASS(wxStringList, wxObject) + // instead of WX_DEFINE_LIST(wxStringListBase) we define this function // ourselves void wxStringListNode::DeleteData() @@ -640,7 +650,7 @@ bool wxStringList::Member(const wxChar *s) const return FALSE; } -static int LINKAGEMODE +extern "C" int LINKAGEMODE wx_comparestrings(const void *arg1, const void *arg2) { wxChar **s1 = (wxChar **) arg1; @@ -670,3 +680,6 @@ void wxStringList::Sort() delete [] array; } + +#endif // wxLIST_COMPATIBILITY +