ewah/bitmap.c: delete unused 'bitmap_each_bit()'

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>

Derrick Stolee committed Jun 15, 2018 at 18:27 UTC 48dc98344facad88ccb954ebdd8440b8ca501800
2 files changed -25
ewah/bitmap.c
-24
@@ -129,30 +129,6 @@ void bitmap_or_ewah(struct bitmap *self, struct ewah_bitmap *other)
129 self->words[i++] |= word;
130 }
131
132 -void bitmap_each_bit(struct bitmap *self, ewah_callback callback, void *data)
133 -{
134 - size_t pos = 0, i;
135 -
136 - for (i = 0; i < self->word_alloc; ++i) {
137 - eword_t word = self->words[i];
138 - uint32_t offset;
139 -
140 - if (word == (eword_t)~0) {
141 - for (offset = 0; offset < BITS_IN_EWORD; ++offset)
142 - callback(pos++, data);
143 - } else {
144 - for (offset = 0; offset < BITS_IN_EWORD; ++offset) {
145 - if ((word >> offset) == 0)
146 - break;
147 -
148 - offset += ewah_bit_ctz64(word >> offset);
149 - callback(pos + offset, data);
150 - }
151 - pos += BITS_IN_EWORD;
152 - }
153 - }
154 -}
155 -
132 size_t bitmap_popcount(struct bitmap *self)
133 {
134 size_t i, count = 0;
ewah/ewok.h
-1
@@ -217,7 +217,6 @@ void bitmap_and_not(struct bitmap *self, struct bitmap *other);
217 void bitmap_or_ewah(struct bitmap *self, struct ewah_bitmap *other);
218 void bitmap_or(struct bitmap *self, const struct bitmap *other);
219
220 -void bitmap_each_bit(struct bitmap *self, ewah_callback callback, void *data);
220 size_t bitmap_popcount(struct bitmap *self);
221
222 #endif