replaced all int/size_t indices in wxControlWithItems API with unsigned int (committing on behalf of ABX)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@38319 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
// Name: common/ctrlsub.cpp
|
||||
// Name: src/common/ctrlsub.cpp
|
||||
// Purpose: wxItemContainer implementation
|
||||
// Author: Vadim Zeitlin
|
||||
// Modified by:
|
||||
@@ -49,9 +49,10 @@ wxItemContainerImmutable::~wxItemContainerImmutable()
|
||||
wxString wxItemContainerImmutable::GetStringSelection() const
|
||||
{
|
||||
wxString s;
|
||||
|
||||
int sel = GetSelection();
|
||||
if ( sel != -1 )
|
||||
s = GetString(sel);
|
||||
if ( sel != wxNOT_FOUND )
|
||||
s = GetString((unsigned int)sel);
|
||||
|
||||
return s;
|
||||
}
|
||||
@@ -71,9 +72,9 @@ wxArrayString wxItemContainerImmutable::GetStrings() const
|
||||
{
|
||||
wxArrayString result;
|
||||
|
||||
const size_t count = GetCount();
|
||||
const unsigned int count = GetCount();
|
||||
result.Alloc(count);
|
||||
for ( size_t n = 0; n < count; n++ )
|
||||
for ( unsigned int n = 0; n < count; n++ )
|
||||
result.Add(GetString(n));
|
||||
|
||||
return result;
|
||||
@@ -94,14 +95,14 @@ wxItemContainer::~wxItemContainer()
|
||||
|
||||
void wxItemContainer::Append(const wxArrayString& strings)
|
||||
{
|
||||
size_t count = strings.GetCount();
|
||||
const size_t count = strings.GetCount();
|
||||
for ( size_t n = 0; n < count; n++ )
|
||||
{
|
||||
Append(strings[n]);
|
||||
}
|
||||
}
|
||||
|
||||
int wxItemContainer::Insert(const wxString& item, int pos, void *clientData)
|
||||
int wxItemContainer::Insert(const wxString& item, unsigned int pos, void *clientData)
|
||||
{
|
||||
int n = DoInsert(item, pos);
|
||||
if ( n != wxNOT_FOUND )
|
||||
@@ -110,8 +111,7 @@ int wxItemContainer::Insert(const wxString& item, int pos, void *clientData)
|
||||
return n;
|
||||
}
|
||||
|
||||
int
|
||||
wxItemContainer::Insert(const wxString& item, int pos, wxClientData *clientData)
|
||||
int wxItemContainer::Insert(const wxString& item, unsigned int pos, wxClientData *clientData)
|
||||
{
|
||||
int n = DoInsert(item, pos);
|
||||
if ( n != wxNOT_FOUND )
|
||||
@@ -124,7 +124,7 @@ wxItemContainer::Insert(const wxString& item, int pos, wxClientData *clientData)
|
||||
// client data
|
||||
// ----------------------------------------------------------------------------
|
||||
|
||||
void wxItemContainer::SetClientObject(int n, wxClientData *data)
|
||||
void wxItemContainer::SetClientObject(unsigned int n, wxClientData *data)
|
||||
{
|
||||
wxASSERT_MSG( m_clientDataItemsType != wxClientData_Void,
|
||||
wxT("can't have both object and void client data") );
|
||||
@@ -147,7 +147,7 @@ void wxItemContainer::SetClientObject(int n, wxClientData *data)
|
||||
DoSetItemClientObject(n, data);
|
||||
}
|
||||
|
||||
wxClientData *wxItemContainer::GetClientObject(int n) const
|
||||
wxClientData *wxItemContainer::GetClientObject(unsigned int n) const
|
||||
{
|
||||
wxASSERT_MSG( m_clientDataItemsType == wxClientData_Object,
|
||||
wxT("this window doesn't have object client data") );
|
||||
@@ -155,7 +155,7 @@ wxClientData *wxItemContainer::GetClientObject(int n) const
|
||||
return DoGetItemClientObject(n);
|
||||
}
|
||||
|
||||
void wxItemContainer::SetClientData(int n, void *data)
|
||||
void wxItemContainer::SetClientData(unsigned int n, void *data)
|
||||
{
|
||||
wxASSERT_MSG( m_clientDataItemsType != wxClientData_Object,
|
||||
wxT("can't have both object and void client data") );
|
||||
@@ -164,7 +164,7 @@ void wxItemContainer::SetClientData(int n, void *data)
|
||||
m_clientDataItemsType = wxClientData_Void;
|
||||
}
|
||||
|
||||
void *wxItemContainer::GetClientData(int n) const
|
||||
void *wxItemContainer::GetClientData(unsigned int n) const
|
||||
{
|
||||
wxASSERT_MSG( m_clientDataItemsType == wxClientData_Void,
|
||||
wxT("this window doesn't have void client data") );
|
||||
|
||||
Reference in New Issue
Block a user