On 25/11/2009, at 3:35 PM, James Maxwell wrote:

> (funny that I didn't get a warning, actually... Is there any build setting 
> that will protect me from a similar bought of blindness in the future?)


The warning you want is 'possible unwanted assignment', and I think it comes 
with the -Wall flag. Note though that the very widely used construction:

        while( object = [myEnumerator nextObject]){...}

will throw this warning which may require quite a bit of code revision to:

        while(( object = [myEnumerator nextObject])){...}

so I also recommend getting into the habit of using the double-bracket notation 
automatically, or use modern fast enumeration.

--Graham


_______________________________________________

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Reply via email to