diff options
author | Stephan Bergmann <sbergman@redhat.com> | 2017-03-30 10:26:24 +0200 |
---|---|---|
committer | Stephan Bergmann <sbergman@redhat.com> | 2017-03-30 10:26:24 +0200 |
commit | 817b026bcb07bc71355d7d0f68d184e66d1b7bd1 (patch) | |
tree | e34f947e8859ee53539ba0e5d137ffae8e63e04f /apple_remote | |
parent | 2f2296d2c328fa8bf3671f8d3591d3a2bdf2752f (diff) |
loplugin:loopvartoosmall
Change-Id: Idd385c764778313bfb419a04ca7a3884b78e88f6
Diffstat (limited to 'apple_remote')
-rw-r--r-- | apple_remote/source/RemoteControlContainer.m | 18 |
1 files changed, 6 insertions, 12 deletions
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]; } } |