X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/359878c33e86222a2156e25705ec97ab630a8763..8d3b6b8aa1cc0d2f927cedd36d490d412ed3da29:/src/mac/carbon/checklst.cpp diff --git a/src/mac/carbon/checklst.cpp b/src/mac/carbon/checklst.cpp index 30057f2887..1169800ec4 100644 --- a/src/mac/carbon/checklst.cpp +++ b/src/mac/carbon/checklst.cpp @@ -13,11 +13,11 @@ // headers & declarations // ============================================================================ -#ifdef __GNUG__ +#if defined(__GNUG__) && !defined(NO_GCC_PRAGMA) #pragma implementation "checklst.h" #endif -#include "wx/defs.h" +#include "wx/wxprec.h" #if wxUSE_CHECKLISTBOX @@ -73,8 +73,8 @@ static pascal void DataBrowserItemNotificationProc(ControlRef browser, DataBrow if ( ref ) { wxCheckListBox* list = wxDynamicCast( (wxObject*) ref , wxCheckListBox ) ; - size_t i = itemID - 1 ; - if (i >= 0 && i < (size_t) list->GetCount() ) + int i = itemID - 1 ; + if (i >= 0 && i < list->GetCount() ) { bool trigger = false ; wxCommandEvent event( @@ -132,8 +132,8 @@ static pascal OSStatus ListBoxGetSetItemData(ControlRef browser, if ( ref ) { wxCheckListBox* list = wxDynamicCast( (wxObject*) ref , wxCheckListBox ) ; - size_t i = itemID - 1 ; - if (i >= 0 && i < (size_t) list->GetCount() ) + int i = itemID - 1 ; + if (i >= 0 && i < list->GetCount() ) { wxMacCFStringHolder cf( list->GetString(i) , list->GetFont().GetEncoding() ) ; verify_noerr( ::SetDataBrowserItemDataText( itemData , cf ) ) ; @@ -148,8 +148,8 @@ static pascal OSStatus ListBoxGetSetItemData(ControlRef browser, if ( ref ) { wxCheckListBox* list = wxDynamicCast( (wxObject*) ref , wxCheckListBox ) ; - size_t i = itemID - 1 ; - if (i >= 0 && i < (size_t) list->GetCount() ) + int i = itemID - 1 ; + if (i >= 0 && i < list->GetCount() ) { verify_noerr( ::SetDataBrowserItemDataButtonValue( itemData , list->IsChecked( i ) ? kThemeButtonOn : kThemeButtonOff ) ) ; err = noErr ; @@ -177,8 +177,8 @@ static pascal OSStatus ListBoxGetSetItemData(ControlRef browser, if ( ref ) { wxCheckListBox* list = wxDynamicCast( (wxObject*) ref , wxCheckListBox ) ; - size_t i = itemID - 1 ; - if (i >= 0 && i < (size_t) list->GetCount() ) + int i = itemID - 1 ; + if (i >= 0 && i < list->GetCount() ) { // we have to change this behind the back, since Check() would be triggering another update round bool newVal = !list->IsChecked( i ) ;