You know, Windows INTPTR crossed my mind, but I didn't even think to look for a 
Qt equivalent.

See, I learn something *every* day! :Q)

- Rod

----------------------------------------
> From: [email protected]
> To: [email protected]
> Subject: Re: Patch: Group Toolbar
> Date: Sat, 4 Jan 2014 07:20:08 +0100
>
> Hi all,
>
> Le vendredi 3 janvier 2014 20:41:31 Rodney Rushing a écrit :
>>> Nope. The behaviour of cast a type that is bigger than the
>>> destination is undefined. If it works, it is a fluke.
>>
>> I see. So it was invalid on your platform, not in VC 32-bit.
>> I can see that it is definitely bad cross-platform practice.
>
> intptr_t, uintptr_t and ptrdiff_t are standard° integer types
> sized to contain a void* (that is int for 32 bits, long int for
> 64 bits, etc.).
> (via <cstdint> in C++)
>
> ° C++11. And also C99 for the former two. (At least, that’s what
> I read in the GCC 4.8 cstdint header file ;o)
>
>
> Qt also has cross-platform quintptr and qptrdiff.
>
>
> reinterpret_cast to one of these types and you should be ok
> for simple cross-platform pointer arithmetic.
>
>
> There are lots of standard types that are not sufficiently
> known or advertized....
>
>
> Thanks all for the good works (those patches and Leocad),
> --
> Sylvain Sauvage
> _______________________________________________
> Leocad mailing list
> [email protected]
> https://list.gerf.org/listinfo/leocad                                         
>   
_______________________________________________
Leocad mailing list
[email protected]
https://list.gerf.org/listinfo/leocad

Reply via email to