Fix inserting an element of wxArrayString itself back into it.
Do the insertion/addition before deallocating the old memory to allow things like array.Add(array[0]) to work correctly. Closes #2290. git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@76909 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -346,6 +346,10 @@ void ArraysTestCase::wxStringArrayTest()
|
||||
a5.resize(3);
|
||||
CPPUNIT_ASSERT_EQUAL( 3, a5.size() );
|
||||
CPPUNIT_ASSERT_EQUAL( "Foo", a5[2] );
|
||||
|
||||
wxArrayString a6;
|
||||
a6.Add("Foo");
|
||||
a6.Insert(a6[0], 1, 100);
|
||||
}
|
||||
|
||||
void ArraysTestCase::SortedArray()
|
||||
|
Reference in New Issue
Block a user