Re: How do I get NSRect to be the same as CGRect?
Re: How do I get NSRect to be the same as CGRect?
- Subject: Re: How do I get NSRect to be the same as CGRect?
- From: "Sean McBride" <email@hidden>
- Date: Mon, 17 Dec 2007 12:48:56 -0500
- Organization: Rogue Research
On 12/16/07 4:56 PM, Rick Mann said:
>Which seem to have identical layouts to me;
Yes, but nothing stops the compiler from padding or aligning CGRect
differently from NSRect. Of course, it's unlikely, but possible. See '-
fstrict-aliasing' in the gcc man page.
So you should use NSRectToCGRect(), don't cast them!
--
____________________________________________________________
Sean McBride, B. Eng email@hidden
Rogue Research www.rogue-research.com
Mac Software Developer Montréal, Québec, Canada
_______________________________________________
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