From fee6778710c82dfbee04ab23061a96d324facfdb Mon Sep 17 00:00:00 2001 From: "thomasvl@gmail.com" Date: Thu, 5 Mar 2009 21:30:41 +0000 Subject: - Changed gtm_createCGPath to gtm_cgPath in GTMNSBezier+CGPath. The path returned is now autoreleased so you don't need to worry about releasing it. - Made some changes to the GTMNSObject+UnitTesting APIs. Specifically renamed gtm_createUnitTestImage to gtm_unitTestImage. The value it returns is now autoreleased, so no need to release it. Also change gtm_createUnitTestBitmapOfSize:withData: to a C function. - Cleaned up GTM so that it passes the Clang checker without any warnings. --- AppKit/GTMNSBezierPath+CGPath.m | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'AppKit/GTMNSBezierPath+CGPath.m') diff --git a/AppKit/GTMNSBezierPath+CGPath.m b/AppKit/GTMNSBezierPath+CGPath.m index 656a139..3624d9e 100644 --- a/AppKit/GTMNSBezierPath+CGPath.m +++ b/AppKit/GTMNSBezierPath+CGPath.m @@ -19,6 +19,7 @@ // #import "GTMNSBezierPath+CGPath.h" #import "GTMDefines.h" +#import "GTMGarbageCollection.h" @implementation NSBezierPath (GTMBezierPathCGPathAdditions) @@ -27,9 +28,9 @@ // Args: // // Returns: -// Converted CGPathRef. Must be released by client (CGPathRelease). +// Converted CGPathRef. // nil if failure. -- (CGPathRef)gtm_createCGPath { +- (CGPathRef)gtm_CGPath { CGMutablePathRef thePath = CGPathCreateMutable(); if (!thePath) return nil; @@ -63,7 +64,7 @@ break; // COV_NF_END }; } - return thePath; + return (CGPathRef)GTMCFAutorelease(thePath); } @end -- cgit v1.2.3