Neil Roberts 61d71c0926 cogl-flags: Fix iterating flag when the most-significant bit is set
When the flags contain a value that only has the most-significant bit
set then ffsl will return the size of an unsigned long. According to
the C spec it is undefined what happens when shifting by a number
greater than or equal to the size of the left operand. On Intel (and
probably others) this seems to end up being a no-op so the iteration
breaks. To fix this we can split the shift into two separate
shifts. We always need to shift by at least one bit so we can put this
one bit shift into a separate operator.

Reviewed-by: Robert Bragg <robert@linux.intel.com>
2011-11-22 16:07:21 +00:00
..
2011-11-16 16:32:11 +00:00
2011-11-01 12:03:02 +00:00
2011-09-06 11:19:20 +01:00
2010-06-01 12:08:18 +01:00
2011-06-09 16:21:15 +01:00
2011-06-09 16:21:15 +01:00
2011-11-01 12:03:02 +00:00
2011-11-01 12:03:02 +00:00
2011-11-14 18:37:57 +00:00
2011-10-21 12:24:01 +01:00
2011-11-16 16:32:11 +00:00
2011-11-16 16:32:11 +00:00
2011-11-01 12:03:02 +00:00
2011-08-12 15:28:42 +01:00