diff options
| author | SND\MaddTheSane_cp <SND\MaddTheSane_cp@e17a0e51-4ae3-4d35-97c3-1a29b211df97> | 2013-07-08 18:40:12 +0000 |
|---|---|---|
| committer | SND\MaddTheSane_cp <SND\MaddTheSane_cp@e17a0e51-4ae3-4d35-97c3-1a29b211df97> | 2013-07-08 18:40:12 +0000 |
| commit | 2eec888d4c40c710ff6ab42b68c2b1a4ca49abc4 (patch) | |
| tree | 770ceaeceb6eb9d2fbebab14b8cf6e5af4f108aa | |
| parent | 634a5f1c0d63f0e43f764f86b4c86de67bda1157 (diff) | |
| download | pcsxr-2eec888d4c40c710ff6ab42b68c2b1a4ca49abc4.tar.gz | |
Move a few last things to fast enumeration on OS X.
git-svn-id: https://pcsxr.svn.codeplex.com/svn/pcsxr@85907 e17a0e51-4ae3-4d35-97c3-1a29b211df97
| -rwxr-xr-x | macosx/ConfigurationController.m | 16 |
1 files changed, 7 insertions, 9 deletions
diff --git a/macosx/ConfigurationController.m b/macosx/ConfigurationController.m index ce0e6d19..e94ee790 100755 --- a/macosx/ConfigurationController.m +++ b/macosx/ConfigurationController.m @@ -170,14 +170,13 @@ NSString *const memCardChangeNumberKey = @"PcsxrMemoryCardThatChangedKey"; if (widescreen) [checkBoxDefaults setObject:widescreen forKey:@"Widescreen"]; // make the visuals match the defaults - NSEnumerator *enumerator= [checkBoxDefaults keyEnumerator]; - id key; - while ((key = [enumerator nextObject])) { + + for (NSString* key in checkBoxDefaults) { if ([defaults integerForKey:key]) { [[checkBoxDefaults objectForKey:key] setNextState]; } } - + // special cases if (![PcsxrController biosAvailable]) { // no bios means always use HLE @@ -231,14 +230,13 @@ NSString *const memCardChangeNumberKey = @"PcsxrMemoryCardThatChangedKey"; - (NSString *)keyForSender:(id)sender { - NSEnumerator *enumerator = [checkBoxDefaults keyEnumerator]; - id key; - while ((key = [enumerator nextObject])) { + for (NSString *key in checkBoxDefaults) { id object = [checkBoxDefaults objectForKey:key]; - if ([object isEqual:sender]) + if ([object isEqual:sender]) { return key; + } } - + return nil; } |
