[Fuse-for-macosx-commits] SF.net SVN: fuse-for-macosx:[646] trunk/fuse
Brought to you by:
fredm
From: <fr...@us...> - 2010-09-24 12:32:42
|
Revision: 646 http://fuse-for-macosx.svn.sourceforge.net/fuse-for-macosx/?rev=646&view=rev Author: fredm Date: 2010-09-24 12:32:35 +0000 (Fri, 24 Sep 2010) Log Message: ----------- Modernise enumerator loops. Modified Paths: -------------- trunk/fuse/fusepb/controllers/FuseController.m trunk/fuse/settings.pl Modified: trunk/fuse/fusepb/controllers/FuseController.m =================================================================== --- trunk/fuse/fusepb/controllers/FuseController.m 2010-08-07 06:44:28 UTC (rev 645) +++ trunk/fuse/fusepb/controllers/FuseController.m 2010-09-24 12:32:35 UTC (rev 646) @@ -1786,8 +1786,7 @@ /* Iterate through matches, setting the title in recentSnaps with the full path with commonPrefix removed, and with snap name - .../ prepended */ - enumerator = [matches objectEnumerator]; - while( (object = [enumerator nextObject]) ) { + for( object in matches ) { unsigned index = [[object objectAtIndex:0] intValue]; NSString *file = [settings_current.cocoa->recent_snapshots objectAtIndex:[[object objectAtIndex:0] intValue]]; Modified: trunk/fuse/settings.pl =================================================================== --- trunk/fuse/settings.pl 2010-08-07 06:44:28 UTC (rev 645) +++ trunk/fuse/settings.pl 2010-09-24 12:32:35 UTC (rev 646) @@ -676,7 +676,6 @@ void settings_get_rom_array( settings_info *settings, NSArray *machineroms ) { - NSEnumerator *enumerator; NSMutableDictionary *roms; if ( machineroms == nil ) { @@ -684,8 +683,7 @@ } CODE -print " enumerator = [machineroms objectEnumerator];\n"; -print " while ( ( roms = [enumerator nextObject] ) ) {\n"; +print " for ( roms in machineroms ) {\n"; print " int machineType = [[roms valueForKey:@\"machine\"] machineType];\n "; my $first=0; foreach my $machine ( sort keys %machineRoms ) { This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |