X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/9b5f1895643cf94b38ac19a4c1151e259310852e..5c62cb6c7dfce1fac3ec9ac23cfef8cd2a043214:/src/motif/combobox.cpp diff --git a/src/motif/combobox.cpp b/src/motif/combobox.cpp index 063cb93c68..de2b16e9b1 100644 --- a/src/motif/combobox.cpp +++ b/src/motif/combobox.cpp @@ -15,7 +15,10 @@ #if wxUSE_COMBOBOX #include "wx/combobox.h" -#include "wx/arrstr.h" + +#ifndef WX_PRECOMP + #include "wx/arrstr.h" +#endif #ifdef __VMS__ #pragma message disable nosimpint @@ -144,7 +147,7 @@ void wxComboBox::SetValue(const wxString& value) m_inSetValue = false; } -void wxComboBox::SetString(int WXUNUSED(n), const wxString& WXUNUSED(s)) +void wxComboBox::SetString(unsigned int WXUNUSED(n), const wxString& WXUNUSED(s)) { wxFAIL_MSG( wxT("wxComboBox::SetString only implemented for Motif 2.0") ); } @@ -159,10 +162,10 @@ int wxComboBox::DoAppend(const wxString& item) return GetCount() - 1; } -int wxComboBox::DoInsert(const wxString& item, int pos) +int wxComboBox::DoInsert(const wxString& item, unsigned int pos) { wxCHECK_MSG(!(GetWindowStyle() & wxCB_SORT), -1, wxT("can't insert into sorted list")); - wxCHECK_MSG((pos>=0) && (pos<=GetCount()), -1, wxT("invalid index")); + wxCHECK_MSG(IsValidInsert(pos), -1, wxT("invalid index")); if (pos == GetCount()) return DoAppend(item); @@ -176,7 +179,7 @@ int wxComboBox::DoInsert(const wxString& item, int pos) return pos; } -void wxComboBox::Delete(int n) +void wxComboBox::Delete(unsigned int n) { XmComboBoxDeletePos((Widget) m_mainWidget, n+1); wxStringList::Node *node = m_stringList.Item(n); @@ -213,7 +216,7 @@ int wxComboBox::GetSelection (void) const return sel - 1; } -wxString wxComboBox::GetString(int n) const +wxString wxComboBox::GetString(unsigned int n) const { wxStringList::Node *node = m_stringList.Item(n); if (node)