[Fuse-for-macosx-commits] SF.net SVN: fuse-for-macosx:[701] trunk/FuseGenerator
Brought to you by:
fredm
From: <fr...@us...> - 2012-11-02 10:27:56
|
Revision: 701 http://fuse-for-macosx.svn.sourceforge.net/fuse-for-macosx/?rev=701&view=rev Author: fredm Date: 2012-11-02 10:27:50 +0000 (Fri, 02 Nov 2012) Log Message: ----------- Modernise Objective-C syntax. Modified Paths: -------------- trunk/FuseGenerator/JWSpectrumScreen/JWSpectrumScreen.m trunk/FuseGenerator/LibspectrumSCRExtractor.m Modified: trunk/FuseGenerator/JWSpectrumScreen/JWSpectrumScreen.m =================================================================== --- trunk/FuseGenerator/JWSpectrumScreen/JWSpectrumScreen.m 2012-11-02 10:22:35 UTC (rev 700) +++ trunk/FuseGenerator/JWSpectrumScreen/JWSpectrumScreen.m 2012-11-02 10:27:50 UTC (rev 701) @@ -342,19 +342,19 @@ NSUInteger length = [zxScreen length]; if(length) { screen0 = [[[NSData alloc] initWithBytes:[zxScreen bytes] length:SCREEN_BITMAP_SIZE] autorelease]; - [dictionary setObject:screen0 forKey:@"Screen0"]; + dictionary[@"Screen0"] = screen0; if(mode == ScreenModeSinclair || mode == ScreenModeTimexHiCol) { assert((mode == ScreenModeSinclair && length == SCREEN_STANDARD_BYTES) || (mode == ScreenModeTimexHiCol && length == SCREEN_TIMEX_HI_COL_BYTES)); attributes = [[[NSData alloc] initWithBytes:[zxScreen bytes] + SCREEN_BITMAP_SIZE length:length - SCREEN_BITMAP_SIZE] autorelease]; - [dictionary setObject:attributes forKey:@"Attributes"]; + dictionary[@"Attributes"] = attributes; } else if( mode == ScreenModeTimexHiRes) { assert(length == SCREEN_TIMEX_HI_RES_BYTES); screen1 = [[[NSData alloc] initWithBytes:[zxScreen bytes] + SCREEN_BITMAP_SIZE length:SCREEN_BITMAP_SIZE] autorelease]; out255 = [[[NSData alloc] initWithBytes:[zxScreen bytes] + 2 * SCREEN_BITMAP_SIZE length:1] autorelease]; - [dictionary setObject:screen1 forKey:@"Screen1"]; - [dictionary setObject:out255 forKey:@"Out255"]; + dictionary[@"Screen1"] = screen1; + dictionary[@"Out255"] = out255; } else { // Wtf? assert(0); Modified: trunk/FuseGenerator/LibspectrumSCRExtractor.m =================================================================== --- trunk/FuseGenerator/LibspectrumSCRExtractor.m 2012-11-02 10:22:35 UTC (rev 700) +++ trunk/FuseGenerator/LibspectrumSCRExtractor.m 2012-11-02 10:27:50 UTC (rev 701) @@ -86,7 +86,7 @@ self = [super init]; fileString = [[NSFileManager defaultManager] fileSystemRepresentationWithPath:[aURL path]]; - filename = [NSString stringWithUTF8String:fileString]; + filename = @(fileString); scrData = nil; scrOptions = nil; @@ -279,8 +279,7 @@ } scrOptions = - [NSDictionary dictionaryWithObject:myValue - forKey:(NSString*)kCGImageSourceTypeIdentifierHint]; + @{(NSString*)kCGImageSourceTypeIdentifierHint: myValue}; scrData = [NSData dataWithBytes:data + data[1] + 2 length:picture_length]; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |