Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.kernel.org/pub/scm/git/git.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/ewah
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2018-06-20 00:51:20 +0300
committerJunio C Hamano <gitster@pobox.com>2018-06-21 19:39:48 +0300
commitc806278e0c7c0e0de5b32d013676326221b86c35 (patch)
treeaccfda366965d71f240ea4a12e22f9f07d16f4f1 /ewah
parent26675087a58e1e7dd54bc0f059ad2f831c6e3fbf (diff)
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>
Diffstat (limited to 'ewah')
-rw-r--r--ewah/ewah_bitmap.c20
-rw-r--r--ewah/ewah_rlw.c8
-rw-r--r--ewah/ewok.h6
-rw-r--r--ewah/ewok_rlw.h1
4 files changed, 12 insertions, 23 deletions
diff --git a/ewah/ewah_bitmap.c b/ewah/ewah_bitmap.c
index 017c677f98..d59b1afe3d 100644
--- a/ewah/ewah_bitmap.c
+++ b/ewah/ewah_bitmap.c
@@ -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)
diff --git a/ewah/ewah_rlw.c b/ewah/ewah_rlw.c
index b9643b7d0f..5093d43e2f 100644
--- a/ewah/ewah_rlw.c
+++ b/ewah/ewah_rlw.c
@@ -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));
- }
-}
diff --git a/ewah/ewok.h b/ewah/ewok.h
index 0c504f28e2..84b2a29faa 100644
--- a/ewah/ewok.h
+++ b/ewah/ewok.h
@@ -73,12 +73,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
*/
void ewah_free(struct ewah_bitmap *self);
diff --git a/ewah/ewok_rlw.h b/ewah/ewok_rlw.h
index bb3c6ff7e0..7cdfdd0c02 100644
--- a/ewah/ewok_rlw.h
+++ b/ewah/ewok_rlw.h
@@ -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)
{