]> git.saurik.com Git - wxWidgets.git/commitdiff
they should be ints, not size_ts
authorRyan Norton <wxprojects@comcast.net>
Sun, 26 Sep 2004 03:25:46 +0000 (03:25 +0000)
committerRyan Norton <wxprojects@comcast.net>
Sun, 26 Sep 2004 03:25:46 +0000 (03:25 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@29374 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

src/mac/carbon/checklst.cpp
src/mac/carbon/listbox.cpp

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