Side Mask
Stanley Sutton
sutton@t-surf.com
Tue Jul 23 11:14:00 GMT 2002
Currently, the side mask set operation is defined as:
#define add_side_to_set(side,mask) ((mask) | (1 << ((side) ? (side)->id
: 0)))
It would seem to be better to define it as:
#define add_side_to_set(side,mask) ((mask) | ((side)?(1 << (side)->id) :
0)))
since that would not modify the mask if the side pointer is null, where
the current definition would set the 0'th (or 31st depending on how you
number the bits) bit if the side mask is null. If the side id can be 0
(which I haven't dug through the code to find out), side 0 or a null
poiter would set the same bit. The remove side from mask would need a
similar correction.
More information about the Xconq7
mailing list