wxStringList::copy ctor and assignment operator added (very inefficient
because they don't take advantage of wxString ref counting) git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@1073 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -491,6 +491,17 @@ void wxStringListNode::DeleteData()
|
||||
delete [] (char *)GetData();
|
||||
}
|
||||
|
||||
void wxStringList::DoCopy(const wxStringList& other)
|
||||
{
|
||||
wxASSERT( GetCount() == 0 ); // this list must be empty before copying!
|
||||
|
||||
size_t count = other.GetCount();
|
||||
for ( size_t n = 0; n < count; n++ )
|
||||
{
|
||||
Add(other.Item(n)->GetData());
|
||||
}
|
||||
}
|
||||
|
||||
// Variable argument list, terminated by a zero
|
||||
// Makes new storage for the strings
|
||||
wxStringList::wxStringList (const char *first, ...)
|
||||
|
Reference in New Issue
Block a user