Re: int* array going astray
Re: int* array going astray
- Subject: Re: int* array going astray
- From: Graham Cox <email@hidden>
- Date: Wed, 25 Nov 2009 15:56:29 +1100
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 (email@hidden)
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:
This email sent to email@hidden