From 817b026bcb07bc71355d7d0f68d184e66d1b7bd1 Mon Sep 17 00:00:00 2001 From: Stephan Bergmann Date: Thu, 30 Mar 2017 10:26:24 +0200 Subject: loplugin:loopvartoosmall Change-Id: Idd385c764778313bfb419a04ca7a3884b78e88f6 --- apple_remote/source/RemoteControlContainer.m | 18 ++++++------------ 1 file changed, 6 insertions(+), 12 deletions(-) (limited to 'apple_remote') diff --git a/apple_remote/source/RemoteControlContainer.m b/apple_remote/source/RemoteControlContainer.m index 0071c80301b6..14ecb36f1336 100644 --- a/apple_remote/source/RemoteControlContainer.m +++ b/apple_remote/source/RemoteControlContainer.m @@ -92,15 +92,13 @@ } - (void) setListeningToRemote: (BOOL) value { - unsigned int i; - for(i=0; i < [remoteControls count]; i++) { + for(NSUInteger i=0; i < [remoteControls count]; i++) { [[remoteControls objectAtIndex: i] setListeningToRemote: value]; } if (value && value != [self isListeningToRemote]) [self performSelector:@selector(reset) withObject:nil afterDelay:0.01]; } - (BOOL) isListeningToRemote { - unsigned int i; - for(i=0; i < [remoteControls count]; i++) { + for(NSUInteger i=0; i < [remoteControls count]; i++) { if ([[remoteControls objectAtIndex: i] isListeningToRemote]) { return YES; } @@ -112,8 +110,7 @@ #ifdef DEBUG NSLog(@"Apple Remote: start listening to events... "); #endif - unsigned int i; - for(i=0; i < [remoteControls count]; i++) { + for(NSUInteger i=0; i < [remoteControls count]; i++) { [[remoteControls objectAtIndex: i] startListening: sender]; } } @@ -121,23 +118,20 @@ #ifdef DEBUG NSLog(@"Apple Remote: stopListening to events... "); #endif - unsigned int i; - for(i=0; i < [remoteControls count]; i++) { + for(NSUInteger i=0; i < [remoteControls count]; i++) { [[remoteControls objectAtIndex: i] stopListening: sender]; } } - (BOOL) isOpenInExclusiveMode { BOOL mode = YES; - unsigned int i; - for(i=0; i < [remoteControls count]; i++) { + for(NSUInteger i=0; i < [remoteControls count]; i++) { mode = mode && ([[remoteControls objectAtIndex: i] isOpenInExclusiveMode]); } return mode; } - (void) setOpenInExclusiveMode: (BOOL) value { - unsigned int i; - for(i=0; i < [remoteControls count]; i++) { + for(NSUInteger i=0; i < [remoteControls count]; i++) { [[remoteControls objectAtIndex: i] setOpenInExclusiveMode:value]; } } -- cgit