ewah: delete unused 'rlwit_discharge_empty()'
Complete the removal of unused 'ewah bitmap' code by removing the now unused 'rlwit_discharge_empty()' function. Also, the 'ewah_clear()' function can now be made a file-scope static symbol. Signed-off-by: Ramsay Jones <ramsay@ramsayjones.plus.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Junio C Hamano committed
Jun 19, 2018 at 22:51 UTC
c806278e0c7c0e0de5b32d013676326221b86c35
4 files changed
+12
-23
ewah/ewah_bitmap.c
+12
-8
@@ -276,6 +276,18 @@ void ewah_each_bit(struct ewah_bitmap *self, void (*callback)(size_t, void*), vo
276
}
277
}
278
279
+/**
280
+ * Clear all the bits in the bitmap. Does not free or resize
281
+ * memory.
282
+ */
283
+static void ewah_clear(struct ewah_bitmap *self)
284
+{
285
+ self->buffer_size = 1;
286
+ self->buffer[0] = 0;
287
+ self->bit_size = 0;
288
+ self->rlw = self->buffer;
289
+}
290
+
291
struct ewah_bitmap *ewah_new(void)
292
{
293
struct ewah_bitmap *self;
@@ -288,14 +300,6 @@ struct ewah_bitmap *ewah_new(void)
300
return self;
301
}
302
291
-void ewah_clear(struct ewah_bitmap *self)
292
-{
293
- self->buffer_size = 1;
294
- self->buffer[0] = 0;
295
- self->bit_size = 0;
296
- self->rlw = self->buffer;
297
-}
298
-
303
void ewah_free(struct ewah_bitmap *self)
304
{
305
if (!self)
ewah/ewah_rlw.c
-8
@@ -104,11 +104,3 @@ size_t rlwit_discharge(
104
105
return index;
106
}
107
-
108
-void rlwit_discharge_empty(struct rlw_iterator *it, struct ewah_bitmap *out)
109
-{
110
- while (rlwit_word_size(it) > 0) {
111
- ewah_add_empty_words(out, 0, rlwit_word_size(it));
112
- rlwit_discard_first_words(it, rlwit_word_size(it));
113
- }
114
-}
ewah/ewok.h
-6
@@ -72,12 +72,6 @@ void ewah_pool_free(struct ewah_bitmap *self);
72
*/
73
struct ewah_bitmap *ewah_new(void);
74
75
-/**
76
- * Clear all the bits in the bitmap. Does not free or resize
77
- * memory.
78
- */
79
-void ewah_clear(struct ewah_bitmap *self);
80
-
75
/**
76
* Free all the memory of the bitmap
77
*/
ewah/ewok_rlw.h
-1
@@ -98,7 +98,6 @@ void rlwit_init(struct rlw_iterator *it, struct ewah_bitmap *bitmap);
98
void rlwit_discard_first_words(struct rlw_iterator *it, size_t x);
99
size_t rlwit_discharge(
100
struct rlw_iterator *it, struct ewah_bitmap *out, size_t max, int negate);
101
-void rlwit_discharge_empty(struct rlw_iterator *it, struct ewah_bitmap *out);
101
102
static inline size_t rlwit_word_size(struct rlw_iterator *it)
103
{