they should be ints, not size_ts

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@29374 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Ryan Norton
2004-09-26 03:25:46 +00:00
parent 359878c33e
commit 45285a6238
2 changed files with 12 additions and 12 deletions

View File

@@ -73,8 +73,8 @@ static pascal void DataBrowserItemNotificationProc(ControlRef browser, DataBrow
if ( ref ) if ( ref )
{ {
wxCheckListBox* list = wxDynamicCast( (wxObject*) ref , wxCheckListBox ) ; wxCheckListBox* list = wxDynamicCast( (wxObject*) ref , wxCheckListBox ) ;
size_t i = itemID - 1 ; int i = itemID - 1 ;
if (i >= 0 && i < (size_t) list->GetCount() ) if (i >= 0 && i < list->GetCount() )
{ {
bool trigger = false ; bool trigger = false ;
wxCommandEvent event( wxCommandEvent event(
@@ -132,8 +132,8 @@ static pascal OSStatus ListBoxGetSetItemData(ControlRef browser,
if ( ref ) if ( ref )
{ {
wxCheckListBox* list = wxDynamicCast( (wxObject*) ref , wxCheckListBox ) ; wxCheckListBox* list = wxDynamicCast( (wxObject*) ref , wxCheckListBox ) ;
size_t i = itemID - 1 ; int i = itemID - 1 ;
if (i >= 0 && i < (size_t) list->GetCount() ) if (i >= 0 && i < list->GetCount() )
{ {
wxMacCFStringHolder cf( list->GetString(i) , list->GetFont().GetEncoding() ) ; wxMacCFStringHolder cf( list->GetString(i) , list->GetFont().GetEncoding() ) ;
verify_noerr( ::SetDataBrowserItemDataText( itemData , cf ) ) ; verify_noerr( ::SetDataBrowserItemDataText( itemData , cf ) ) ;
@@ -148,8 +148,8 @@ static pascal OSStatus ListBoxGetSetItemData(ControlRef browser,
if ( ref ) if ( ref )
{ {
wxCheckListBox* list = wxDynamicCast( (wxObject*) ref , wxCheckListBox ) ; wxCheckListBox* list = wxDynamicCast( (wxObject*) ref , wxCheckListBox ) ;
size_t i = itemID - 1 ; int i = itemID - 1 ;
if (i >= 0 && i < (size_t) list->GetCount() ) if (i >= 0 && i < list->GetCount() )
{ {
verify_noerr( ::SetDataBrowserItemDataButtonValue( itemData , list->IsChecked( i ) ? kThemeButtonOn : kThemeButtonOff ) ) ; verify_noerr( ::SetDataBrowserItemDataButtonValue( itemData , list->IsChecked( i ) ? kThemeButtonOn : kThemeButtonOff ) ) ;
err = noErr ; err = noErr ;
@@ -177,8 +177,8 @@ static pascal OSStatus ListBoxGetSetItemData(ControlRef browser,
if ( ref ) if ( ref )
{ {
wxCheckListBox* list = wxDynamicCast( (wxObject*) ref , wxCheckListBox ) ; wxCheckListBox* list = wxDynamicCast( (wxObject*) ref , wxCheckListBox ) ;
size_t i = itemID - 1 ; int i = itemID - 1 ;
if (i >= 0 && i < (size_t) list->GetCount() ) if (i >= 0 && i < list->GetCount() )
{ {
// we have to change this behind the back, since Check() would be triggering another update round // we have to change this behind the back, since Check() would be triggering another update round
bool newVal = !list->IsChecked( i ) ; bool newVal = !list->IsChecked( i ) ;

View File

@@ -78,7 +78,7 @@ static pascal void DataBrowserItemNotificationProc(ControlRef browser, DataBrow
if ( ref ) if ( ref )
{ {
wxListBox* list = wxDynamicCast( (wxObject*) ref , wxListBox ) ; wxListBox* list = wxDynamicCast( (wxObject*) ref , wxListBox ) ;
size_t i = itemID - 1 ; int i = itemID - 1 ;
if (i >= 0 && i < list->GetCount() ) if (i >= 0 && i < list->GetCount() )
{ {
bool trigger = false ; bool trigger = false ;
@@ -136,7 +136,7 @@ static pascal OSStatus ListBoxGetSetItemData(ControlRef browser,
if ( ref ) if ( ref )
{ {
wxListBox* list = wxDynamicCast( (wxObject*) ref , wxListBox ) ; wxListBox* list = wxDynamicCast( (wxObject*) ref , wxListBox ) ;
size_t i = itemID - 1 ; int i = itemID - 1 ;
if (i >= 0 && i < list->GetCount() ) if (i >= 0 && i < list->GetCount() )
{ {
wxMacCFStringHolder cf( list->GetString(i) , list->GetFont().GetEncoding() ) ; wxMacCFStringHolder cf( list->GetString(i) , list->GetFont().GetEncoding() ) ;
@@ -694,7 +694,7 @@ bool wxListBox::MacIsSelected( int n ) const
int wxListBox::MacGetSelection() const int wxListBox::MacGetSelection() const
{ {
for ( size_t i = 0 ; i < GetCount() ; ++i ) for ( int i = 0 ; i < GetCount() ; ++i )
{ {
if ( m_peer->IsItemSelected( i + 1 ) ) if ( m_peer->IsItemSelected( i + 1 ) )
{ {
@@ -709,7 +709,7 @@ int wxListBox::MacGetSelections( wxArrayInt& aSelections ) const
int no_sel = 0 ; int no_sel = 0 ;
aSelections.Empty(); aSelections.Empty();
for ( size_t i = 0 ; i < GetCount() ; ++i ) for ( int i = 0 ; i < GetCount() ; ++i )
{ {
if ( m_peer->IsItemSelected( i + 1 ) ) if ( m_peer->IsItemSelected( i + 1 ) )
{ {