From: Julian Smart Date: Tue, 7 Aug 2007 13:55:12 +0000 (+0000) Subject: Compile fix for VC++ 6 X-Git-Url: https://git.saurik.com/wxWidgets.git/commitdiff_plain/e081b01f4d82c713d57a3c824b8b6597e2660cc3 Compile fix for VC++ 6 git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@47925 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- diff --git a/samples/widgets/itemcontainer.cpp b/samples/widgets/itemcontainer.cpp index b74f8fdccc..ad3aea3a5d 100644 --- a/samples/widgets/itemcontainer.cpp +++ b/samples/widgets/itemcontainer.cpp @@ -253,7 +253,8 @@ void ItemContainerWidgetsPage::OnButtonTestItemContainer(wxCommandEvent&) StartTest(_T("Append some items with data objects")); wxClientData **objects = new wxClientData *[m_items.GetCount()]; - for ( unsigned i = 0; i < m_items.GetCount(); ++i ) + unsigned i; + for ( i = 0; i < m_items.GetCount(); ++i ) objects[i] = CreateClientData(i); m_container->Append(m_items, objects); EndTest(expected_result); @@ -261,19 +262,19 @@ void ItemContainerWidgetsPage::OnButtonTestItemContainer(wxCommandEvent&) StartTest(_T("Append some items with data")); void **data = new void *[m_items.GetCount()]; - for ( unsigned i = 0; i < m_items.GetCount(); ++i ) + for ( i = 0; i < m_items.GetCount(); ++i ) data[i] = (void*)i; m_container->Append(m_items, data); EndTest(expected_result); delete[] data; StartTest(_T("Append some items with data, one by one")); - for ( unsigned i = 0; i < m_items.GetCount(); ++i ) + for ( i = 0; i < m_items.GetCount(); ++i ) m_container->Append(m_items[i], (void*)i); EndTest(expected_result); StartTest(_T("Append some items with data objects, one by one")); - for ( unsigned i = 0; i < m_items.GetCount(); ++i ) + for ( i = 0; i < m_items.GetCount(); ++i ) m_container->Append(m_items[i], CreateClientData(i)); EndTest(expected_result);