From 1e02afcbdff45317c91a2c9edca7b93dc84d813e Mon Sep 17 00:00:00 2001 From: Lioncash Date: Sat, 20 Sep 2014 21:38:59 -0400 Subject: [PATCH] iOS: Get rid of some unsigned/signed comparison warnings. --- apple/common/utility.m | 2 +- apple/iOS/browser.m | 4 ++-- apple/iOS/menu.m | 6 +++--- apple/iOS/platform.m | 2 +- 4 files changed, 7 insertions(+), 7 deletions(-) diff --git a/apple/common/utility.m b/apple/common/utility.m index 2ca230d4ee..15003e2612 100644 --- a/apple/common/utility.m +++ b/apple/common/utility.m @@ -64,7 +64,7 @@ void apple_display_alert(const char *message, const char *title) - (BOOL)isPartialStringValid:(NSString*)partialString newEditingString:(NSString**)newString errorDescription:(NSString**)error { - int i; + NSUInteger i; bool hasDot = false; if (partialString.length) diff --git a/apple/iOS/browser.m b/apple/iOS/browser.m index 94c3034e61..2de8df6d1f 100644 --- a/apple/iOS/browser.m +++ b/apple/iOS/browser.m @@ -251,7 +251,7 @@ static void file_action(enum file_action action, NSString* source, NSString* tar dir_list_sort(contents, true); - for (int i = 0; i < contents->size; i ++) + for (size_t i = 0; i < contents->size; i ++) { const char* basename = path_basename(contents->elems[i].data); @@ -427,7 +427,7 @@ static void file_action(enum file_action action, NSString* source, NSString* tar if (contents) { - int i; + size_t i; dir_list_sort(contents, true); for (i = 0; i < contents->size; i ++) diff --git a/apple/iOS/menu.m b/apple/iOS/menu.m index 58980801d5..a6a443eb19 100644 --- a/apple/iOS/menu.m +++ b/apple/iOS/menu.m @@ -52,7 +52,7 @@ typedef void (^RAActionSheetCallback)(UIActionSheet*, NSInteger); static void RunActionSheet(const char* title, const struct string_list* items, UIView* parent, RAActionSheetCallback callback) { - int i; + size_t i; RARunActionSheetDelegate* delegate = [[RARunActionSheetDelegate alloc] initWithCallbackBlock:callback]; UIActionSheet* actionSheet = [UIActionSheet new]; @@ -683,7 +683,7 @@ static void RunActionSheet(const char* title, const struct string_list* items, U - (void)willReloadData { - int i; + size_t i; RAHistoryMenu* __weak weakSelf = self; NSMutableArray *section = [NSMutableArray arrayWithObject:BOXSTRING("")]; @@ -907,7 +907,7 @@ static void RunActionSheet(const char* title, const struct string_list* items, U - (void)willReloadData { - int i; + size_t i; const core_info_list_t* core_list; RAFrontendSettingsMenu* __weak weakSelf = self; NSMutableArray* cores = (NSMutableArray*)self.coreConfigOptions; diff --git a/apple/iOS/platform.m b/apple/iOS/platform.m index b94a801cfb..5aa283b21c 100644 --- a/apple/iOS/platform.m +++ b/apple/iOS/platform.m @@ -116,7 +116,7 @@ static void handle_touch_event(NSArray* touches) // Keyboard handler for iOS 7 - (id)_keyCommandForEvent:(UIEvent*)event { - int i; + NSUInteger i; // This gets called twice with the same timestamp for each keypress, that's fine for polling // but is bad for business with events. static double last_time_stamp;