X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/ecf9e593f8f77a9105bfaf6c94aae1baa84020da..236a9de39afa090fdee3cf91cb5364ceca69e3f8:/src/common/list.cpp?ds=sidebyside diff --git a/src/common/list.cpp b/src/common/list.cpp index 9d88dea967..971dca379c 100644 --- a/src/common/list.cpp +++ b/src/common/list.cpp @@ -172,10 +172,10 @@ void wxListBase::DoCopy(const wxListBase& list) m_nodeLast = (wxNodeBase *) NULL; switch (m_keyType) { - + case wxKEY_INTEGER: { - long key; + long key; for ( wxNodeBase *node = list.GetFirst(); node; node = node->GetNext() ) { key = node->GetKeyInteger(); @@ -186,7 +186,7 @@ void wxListBase::DoCopy(const wxListBase& list) case wxKEY_STRING: { - const wxChar *key; + const wxChar *key; for ( wxNodeBase *node = list.GetFirst(); node; node = node->GetNext() ) { key = node->GetKeyString(); @@ -578,6 +578,7 @@ void wxStringList::DoCopy(const wxStringList& other) // Makes new storage for the strings wxStringList::wxStringList (const wxChar *first, ...) { + DeleteContents(TRUE); if ( !first ) return;