(ugly) compilation fix for wxUSE_STL==1 build
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@47779 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -121,7 +121,7 @@ void ItemContainerWidgetsPage::StartTest(const wxString& label)
|
|||||||
wxLogMessage(_T("Test - %s:"), label.c_str());
|
wxLogMessage(_T("Test - %s:"), label.c_str());
|
||||||
}
|
}
|
||||||
|
|
||||||
void ItemContainerWidgetsPage::EndTest(const wxArrayString& items)
|
void ItemContainerWidgetsPage::EndTest(const wxMaybeSortedArrayString& items)
|
||||||
{
|
{
|
||||||
const unsigned count = m_container->GetCount();
|
const unsigned count = m_container->GetCount();
|
||||||
|
|
||||||
@@ -177,7 +177,7 @@ void ItemContainerWidgetsPage::EndTest(const wxArrayString& items)
|
|||||||
}
|
}
|
||||||
|
|
||||||
wxString
|
wxString
|
||||||
ItemContainerWidgetsPage::DumpContainerData(const wxArrayString& expected) const
|
ItemContainerWidgetsPage::DumpContainerData(const wxMaybeSortedArrayString& expected) const
|
||||||
{
|
{
|
||||||
wxString str;
|
wxString str;
|
||||||
str << _T("Current content:\n");
|
str << _T("Current content:\n");
|
||||||
@@ -238,8 +238,8 @@ void ItemContainerWidgetsPage::OnButtonTestItemContainer(wxCommandEvent&)
|
|||||||
GetWidget()->GetClassInfo()->GetClassName(),
|
GetWidget()->GetClassInfo()->GetClassName(),
|
||||||
(m_container->IsSorted() ? "Sorted" : "Unsorted"));
|
(m_container->IsSorted() ? "Sorted" : "Unsorted"));
|
||||||
|
|
||||||
const wxArrayString
|
const wxMaybeSortedArrayString&
|
||||||
& expected_result = m_container->IsSorted() ? m_itemsSorted
|
expected_result = m_container->IsSorted() ? m_itemsSorted
|
||||||
: m_items;
|
: m_items;
|
||||||
|
|
||||||
StartTest(_T("Append one item"));
|
StartTest(_T("Append one item"));
|
||||||
|
@@ -15,6 +15,14 @@
|
|||||||
|
|
||||||
#include "widgets.h"
|
#include "widgets.h"
|
||||||
|
|
||||||
|
// define a common base class for sorted and normal string arrays
|
||||||
|
#if wxUSE_STL
|
||||||
|
typedef wxBaseArrayStringBase wxMaybeSortedArrayString;
|
||||||
|
#else
|
||||||
|
// in non-STL build wxSortedArrayString derives from wxArrayString
|
||||||
|
typedef wxArrayString wxMaybeSortedArrayString;
|
||||||
|
#endif
|
||||||
|
|
||||||
class ItemContainerWidgetsPage : public WidgetsPage
|
class ItemContainerWidgetsPage : public WidgetsPage
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
@@ -29,7 +37,7 @@ public:
|
|||||||
|
|
||||||
private:
|
private:
|
||||||
void StartTest(const wxString& label);
|
void StartTest(const wxString& label);
|
||||||
void EndTest(const wxArrayString& result);
|
void EndTest(const wxMaybeSortedArrayString& result);
|
||||||
|
|
||||||
// Track client data in wxItemContainer instances
|
// Track client data in wxItemContainer instances
|
||||||
wxClientData* CreateClientData(int value);
|
wxClientData* CreateClientData(int value);
|
||||||
@@ -40,7 +48,7 @@ private:
|
|||||||
bool VerifyAllClientDataDestroyed();
|
bool VerifyAllClientDataDestroyed();
|
||||||
bool VerifyClientData(wxUIntPtr i, const wxString& str);
|
bool VerifyClientData(wxUIntPtr i, const wxString& str);
|
||||||
|
|
||||||
wxString DumpContainerData(const wxArrayString& expected) const;
|
wxString DumpContainerData(const wxMaybeSortedArrayString& expected) const;
|
||||||
|
|
||||||
wxArrayString m_items;
|
wxArrayString m_items;
|
||||||
wxSortedArrayString m_itemsSorted;
|
wxSortedArrayString m_itemsSorted;
|
||||||
|
Reference in New Issue
Block a user