Browse Source

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

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>
maint
Derrick Stolee 7 years ago committed by Junio C Hamano
parent
commit
b36c3134bb
  1. 8
      ewah/bitmap.c
  2. 1
      ewah/ewok.h

8
ewah/bitmap.c

@ -45,14 +45,6 @@ void bitmap_set(struct bitmap *self, size_t pos)
self->words[block] |= EWAH_MASK(pos); self->words[block] |= EWAH_MASK(pos);
} }


void bitmap_clear(struct bitmap *self, size_t pos)
{
size_t block = EWAH_BLOCK(pos);

if (block < self->word_alloc)
self->words[block] &= ~EWAH_MASK(pos);
}

int bitmap_get(struct bitmap *self, size_t pos) int bitmap_get(struct bitmap *self, size_t pos)
{ {
size_t block = EWAH_BLOCK(pos); size_t block = EWAH_BLOCK(pos);

1
ewah/ewok.h

@ -204,7 +204,6 @@ struct bitmap {


struct bitmap *bitmap_new(void); struct bitmap *bitmap_new(void);
void bitmap_set(struct bitmap *self, size_t pos); void bitmap_set(struct bitmap *self, size_t pos);
void bitmap_clear(struct bitmap *self, size_t pos);
int bitmap_get(struct bitmap *self, size_t pos); int bitmap_get(struct bitmap *self, size_t pos);
void bitmap_reset(struct bitmap *self); void bitmap_reset(struct bitmap *self);
void bitmap_free(struct bitmap *self); void bitmap_free(struct bitmap *self);

Loading…
Cancel
Save