Hi Paul, 

> -----Original Message-----
> 
> When I said "I can't see a need for testing (mask < 0) or 
> (mask > 0)," I meant to say that I don't see a need to know 
> the sign of a bitmask variable. Thus we should use unsigned 
> for bitmasks. As the name implies, unsigned variables don't 
> have a sign. The alternative, signed, imbues bitmasks with 
> the ability to be positive or negative, which is not useful 
> in code that deals with bitmasks.

I think back to writing assembly code and reading the status register of a 
device where it was easy to test if something had changed by checking if the 
register was negative.  There were other bits in the register so it was useful 
to think of it as signed in that first test in order to use fewer instructions. 
 Perhaps not in osg but there can be reasons to think of a bitmask as signed.

> 
> Sorry for the confusion.
>     -Paul

----
Tom Jolley
_______________________________________________
osg-submissions mailing list
[email protected]
http://lists.openscenegraph.org/listinfo.cgi/osg-submissions-openscenegraph.org

Reply via email to