X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/9b5f1895643cf94b38ac19a4c1151e259310852e..4bc6f7a06c494917409bbb673526f090bc51d2d2:/src/motif/combobox.cpp?ds=sidebyside diff --git a/src/motif/combobox.cpp b/src/motif/combobox.cpp index 063cb93c68..49a8f87dbe 100644 --- a/src/motif/combobox.cpp +++ b/src/motif/combobox.cpp @@ -49,7 +49,7 @@ bool wxComboBox::Create(wxWindow *parent, wxWindowID id, if( !CreateControl( parent, id, pos, size, style, validator, name ) ) return false; - m_noStrings = n; + m_noStrings = (size_t)n; Widget parentWidget = (Widget) parent->GetClientWidget(); @@ -162,7 +162,7 @@ int wxComboBox::DoAppend(const wxString& item) int wxComboBox::DoInsert(const wxString& item, 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);