qwzybug/TouchFoundation — comment on commit 51eefed7e8407248c3351f947bf5f56273f0fdf4
File:  line 0
By qwzybug:

Lets you use the out parameter without a test. E.g.,

- (void)parseMySketchyWebServiceResults:(NSArray *)results;
{
NSDateFormatter *serviceFormatter = nil;
for (MyServiceObject *obj in results)
{
...
NSDateFormatter __autoreleasing *outFormatter = serviceFormatter;
obj.parsedDate = [NSDate dateWithInternetString:obj.serviceDateString usedFormatter:&outFormatter];
if (outFormatter) serviceFormatter = outFormatter;
...
}
}

without the temp variables, this oughta work too, unless I'm an idiot:

- (void)parseMySketchyWebServiceResults:(NSArray *)results;
{
__autoreleasing NSDateFormatter *serviceFormatter = nil;
for (MyServiceObject *obj in results)
{
...
obj.parsedDate = [NSDate dateWithInternetString:obj.serviceDateString usedFormatter:&serviceFormatter];
...
}
}