- wxRibbonPageTabInfoArray sorted_pages;
- for(i = 0; i < numtabs; ++i)
- {
- // Sneaky obj array trickery to not copy the tab descriptors
- if (!m_pages.Item(i).shown)
- continue;
- sorted_pages.Add(&m_pages.Item(i));
- }
- sorted_pages.Sort(OrderPageTabInfoBySmallWidthAsc);
+ wxVector<PageComparedBySmallWidthAsc> sorted_pages;
+ sorted_pages.reserve(numtabs);
+ for ( i = 0; i < numtabs; ++i )
+ sorted_pages.push_back(PageComparedBySmallWidthAsc(&m_pages.Item(i)));
+
+ wxVectorSort(sorted_pages);