]> git.ipfire.org Git - thirdparty/git.git/commitdiff
ewah: delete unused 'rlwit_discharge_empty()'
authorJunio C Hamano <gitster@pobox.com>
Tue, 19 Jun 2018 21:51:20 +0000 (22:51 +0100)
committerJunio C Hamano <gitster@pobox.com>
Thu, 21 Jun 2018 16:39:48 +0000 (09:39 -0700)
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>
ewah/ewah_bitmap.c
ewah/ewah_rlw.c
ewah/ewok.h
ewah/ewok_rlw.h

index 017c677f98452d03e4d7999528d58b873ca69ce3..d59b1afe3d6a83b89dc30e19e61f8a3e9b1cc0aa 100644 (file)
@@ -276,6 +276,18 @@ void ewah_each_bit(struct ewah_bitmap *self, void (*callback)(size_t, void*), vo
        }
 }
 
+/**
+ * Clear all the bits in the bitmap. Does not free or resize
+ * memory.
+ */
+static void ewah_clear(struct ewah_bitmap *self)
+{
+       self->buffer_size = 1;
+       self->buffer[0] = 0;
+       self->bit_size = 0;
+       self->rlw = self->buffer;
+}
+
 struct ewah_bitmap *ewah_new(void)
 {
        struct ewah_bitmap *self;
@@ -288,14 +300,6 @@ struct ewah_bitmap *ewah_new(void)
        return self;
 }
 
-void ewah_clear(struct ewah_bitmap *self)
-{
-       self->buffer_size = 1;
-       self->buffer[0] = 0;
-       self->bit_size = 0;
-       self->rlw = self->buffer;
-}
-
 void ewah_free(struct ewah_bitmap *self)
 {
        if (!self)
index b9643b7d0f4420b0ebbd7315a3308407bdfafa53..5093d43e2f00e2bec4290c1fe918d8a0593e2e8c 100644 (file)
@@ -104,11 +104,3 @@ size_t rlwit_discharge(
 
        return index;
 }
-
-void rlwit_discharge_empty(struct rlw_iterator *it, struct ewah_bitmap *out)
-{
-       while (rlwit_word_size(it) > 0) {
-               ewah_add_empty_words(out, 0, rlwit_word_size(it));
-               rlwit_discard_first_words(it, rlwit_word_size(it));
-       }
-}
index 0c504f28e2a4f66eed5851330f27344d745528da..84b2a29faa0c57410168ad5afb2dbaa7a49ddd60 100644 (file)
@@ -72,12 +72,6 @@ void ewah_pool_free(struct ewah_bitmap *self);
  */
 struct ewah_bitmap *ewah_new(void);
 
-/**
- * Clear all the bits in the bitmap. Does not free or resize
- * memory.
- */
-void ewah_clear(struct ewah_bitmap *self);
-
 /**
  * Free all the memory of the bitmap
  */
index bb3c6ff7e05c0e3cb51a2ae5a065baa372e1d7f4..7cdfdd0c020e37abbc30624b2ea1bcf4ef0ddfee 100644 (file)
@@ -98,7 +98,6 @@ void rlwit_init(struct rlw_iterator *it, struct ewah_bitmap *bitmap);
 void rlwit_discard_first_words(struct rlw_iterator *it, size_t x);
 size_t rlwit_discharge(
        struct rlw_iterator *it, struct ewah_bitmap *out, size_t max, int negate);
-void rlwit_discharge_empty(struct rlw_iterator *it, struct ewah_bitmap *out);
 
 static inline size_t rlwit_word_size(struct rlw_iterator *it)
 {