Added bitset_for_each_clear
authorDaniel Grund <grund@cs.uni-saarland.de>
Tue, 11 Jan 2005 15:34:18 +0000 (15:34 +0000)
committerDaniel Grund <grund@cs.uni-saarland.de>
Tue, 11 Jan 2005 15:34:18 +0000 (15:34 +0000)
[r4855]

ir/adt/bitset.h

index 0d26950..a1775c5 100644 (file)
@@ -269,6 +269,10 @@ static INLINE unsigned long _bitset_next(const bitset_t *bs,
 #define bitset_foreach(bitset,elm) \
   for(elm = bitset_next_set(bitset,0); elm != -1; elm = bitset_next_set(bitset,elm+1))
 
+
+#define bitset_foreach_clear(bitset,elm) \
+  for(elm = bitset_next_clear(bitset,0); elm != -1; elm = bitset_next_clear(bitset,elm+1))
+
 /**
  * Count the bits set.
  * This can also be seen as the cardinality of the set.