But then e.g. when building 32-bit i still have to cast the return value or i get the warning:-
'implicit conversion shortens 64-bit value into a 32-bit value' It seems that this warning is my fault because i have added the flag -Wshorten-64-to-32 which isn't enabled by default so maybe it shouldn't be? Thanks On 10 August 2010 15:19, Graham Cox <[email protected]> wrote: > > On 11/08/2010, at 12:12 AM, steven Hooley wrote: > >> Because CGFloat is typedef'd to float on 32bit and double on 64bit i >> have to swap between, eg, atan and atanf depending on my build >> settings. I have a framework which is intended to support 32bit and >> 64bit. > > > Just use atan(). 32-bit floats are promoted to doubles silently. There is a > slight performance penalty but it's absolutely tiny. > > --Graham > > > _______________________________________________ Cocoa-dev mailing list ([email protected]) 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 [email protected]
