Le 9 févr. 09 à 09:50, Rob Keniger a écrit :


On 09/02/2009, at 6:33 PM, Jean-Daniel Dupas wrote:

NSSize a = NSMakeSize( 11.2f, 22.4f);

The "f" suffix is a hint to the compiler that it's a float value.

A very bad idea as it would force usage of float in 64bits applications where NSSize expect 64 bits CGFloat.


So what is the recommendation for 64-bit development? Do we really have to litter our code with (CGFloat) casts all over the place, or is there some way we can tell the compiler to treat our floating point literals as float on 32-bit and double on 64-bit?

--
Rob Keniger


Which warning flag have you enabled to have this warning. I don't see it by default ?


_______________________________________________

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