Hi Matteo, sorry for the lag, hope you had a great holiday season - Matteo Casalin wrote:
just and after-thought: some of the cleaned-up I/Os regard variables of type "long" (Pair, Rectangle...). I was afraid this could be platform dependent, but it seems that SvStream casts them to int "if(SAL_TYPES_SIZEOFLONG != 4)". The question then becomes: do that data really need to be of type long? Rectangle, for example, are widely used, and type long doubles their size in 64-bit machines.
Yes, it looks unfortunate. Problem is, this type is exposed on the class interface, so you'll create substantial follow-on work on all places that work with those values. It might not be worth the effort, e.g. vcl is full of long arithmetic.
I plan to fix some issues I noticed in ValueSet handling (color selection in option dialog). I also would like to reduce memory footprint of that code (e.g. ValueSetItem: use a union instead of allocating multiple data types which are handled in a mutually exclusive way. I think that a template with specializations would be overkill in this case, but any suggestion regarding this is really welcome: maybe unions are not appreciated).
First check if that's worth the effort - how many instances are typically created? Unions are fine I guess - or have a look at http://www.boost.org/doc/libs/1_48_0/doc/html/any.html Cheers, -- Thorsten
Attachment:
pgpqznoTBN_SB.pgp
Description: PGP signature