]> granicus.if.org Git - git/commitdiff
ewah/bitmap.c: delete unused 'bitmap_each_bit()'
authorDerrick Stolee <dstolee@microsoft.com>
Fri, 15 Jun 2018 18:27:41 +0000 (18:27 +0000)
committerJunio C Hamano <gitster@pobox.com>
Mon, 18 Jun 2018 17:16:19 +0000 (10:16 -0700)
Reported-by: Ramsay Jones <ramsay@ramsayjones.plus.com>
Signed-off-by: Derrick Stolee <dstolee@microsoft.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
ewah/bitmap.c
ewah/ewok.h

index d61dc6114a852ae2b622421143394cba29076078..52f1178db4ce35103545a3e1ee00a3000b08eb90 100644 (file)
@@ -129,30 +129,6 @@ void bitmap_or_ewah(struct bitmap *self, struct ewah_bitmap *other)
                self->words[i++] |= word;
 }
 
-void bitmap_each_bit(struct bitmap *self, ewah_callback callback, void *data)
-{
-       size_t pos = 0, i;
-
-       for (i = 0; i < self->word_alloc; ++i) {
-               eword_t word = self->words[i];
-               uint32_t offset;
-
-               if (word == (eword_t)~0) {
-                       for (offset = 0; offset < BITS_IN_EWORD; ++offset)
-                               callback(pos++, data);
-               } else {
-                       for (offset = 0; offset < BITS_IN_EWORD; ++offset) {
-                               if ((word >> offset) == 0)
-                                       break;
-
-                               offset += ewah_bit_ctz64(word >> offset);
-                               callback(pos + offset, data);
-                       }
-                       pos += BITS_IN_EWORD;
-               }
-       }
-}
-
 size_t bitmap_popcount(struct bitmap *self)
 {
        size_t i, count = 0;
index 8714585333606eff90a291bf573ccad382e41e6c..7c04e6e35657fd665b743305d3870d692d62a6ae 100644 (file)
@@ -217,7 +217,6 @@ void bitmap_and_not(struct bitmap *self, struct bitmap *other);
 void bitmap_or_ewah(struct bitmap *self, struct ewah_bitmap *other);
 void bitmap_or(struct bitmap *self, const struct bitmap *other);
 
-void bitmap_each_bit(struct bitmap *self, ewah_callback callback, void *data);
 size_t bitmap_popcount(struct bitmap *self);
 
 #endif