Group 'all' mask

Hello List,

In the constructor of class Group it seems that the all group occupies
index 0 and has a mask of 1.
This seems odd to me and like a waste of a group index. Couldn't we
have MAX_GROUP+1 groups including 'all' if we assign group all a mask
of 0 and test for group membership like this:

(atom->mask[i] & groupmask) == groupmask

This would always be true for a mask of 0 and mask 1 would be
available for a real user defined group. (Currently mask is
initialized to 1 in create_atom)


By the way,

looking into "groupbit" occurences in the sources, I found what I suppose is a typo in variable.cpp. On lines 610 and 627 it has the conditional: if (mask[i] && groupbit) ... (instead of &), that is always true in current implementation.


16.10.2013, 20:13, "Daniel Schwen" <[email protected]...>:

It’s a clever idea, but I’m not going to lose sleep over

the benefit of having 33 groups instead of 32. Plus
the test would have to be changed everywhere and

would become slightly more expensive than the current test.


yes - that’s a bug - just changed it

good catch,