Hi Paul and Wojtek, On Fri, Nov 20, 2009 at 12:22 AM, Paul Martz <[email protected]> wrote: > Wojciech Lewandowski wrote: >> >> I believe Robert used really clever method to solve our dispute: avoid >> controversial decisions that could stirr the forums again and let the time >> pass ;-). I don't know how about you, but it worked for me. > > I would prefer to have a standard to follow for future submissions so that > OSG will be consistent internally. I might not agree with the chosen > standard but at least I'd know what the standard was, and I would follow it > as faithfully as possible. > >> >> the moment I don't really care if bitmasks are signed or not ;-) > > If you don't care, and Robert doesn't care, then I don't care either. :-)
Use of a typedef is certainly the right thing to, as this insulates the OSG and end users from the underlying type we choose. Right now this is what I added mix. We should steadily move the OSG across to use appropriately named typedef's for the type of the bit basks. As to whether int is better than uint, originally I've always preferred uint as it feels logically aligned with the role of bit mask, and I've historically always used uint's for bit masks because of this preference. However, having to do casts or disable warnings just to get around the fact that a enum's an int, and our convention for bitmasks has been a uint is a pain. In terms of code quality casts and disabling warnings are bad, while a int mask is just a bit awkward - given this logic is pulling me towards using int's for masks where we use enum's as the means of defining them. Robert. _______________________________________________ osg-submissions mailing list [email protected] http://lists.openscenegraph.org/listinfo.cgi/osg-submissions-openscenegraph.org
