From 2eec888d4c40c710ff6ab42b68c2b1a4ca49abc4 Mon Sep 17 00:00:00 2001 From: "SND\\MaddTheSane_cp" Date: Mon, 8 Jul 2013 18:40:12 +0000 Subject: 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 --- macosx/ConfigurationController.m | 16 +++++++--------- 1 file changed, 7 insertions(+), 9 deletions(-) (limited to 'macosx/ConfigurationController.m') 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; } -- cgit v1.2.3