ewah: use less generic macro name

The ewah/ewok.h header pollutes the global namespace with
"BITS_IN_WORD", without any specific notion that we are
talking about the bits in an eword_t. We can give this the
more specific name "BITS_IN_EWORD".

Signed-off-by: Jeff King <peff@peff.net>
Reviewed-by: Eric Sunshine <sunshine@sunshineco.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
This commit is contained in:
Jeff King
2015-06-03 02:39:37 -04:00
committed by Junio C Hamano
parent 414382fb00
commit 34b935c01f
4 changed files with 23 additions and 23 deletions

View File

@ -618,7 +618,7 @@ static void show_objects_for_type(
while (i < objects->word_alloc && ewah_iterator_next(&filter, &it)) {
eword_t word = objects->words[i] & filter;
for (offset = 0; offset < BITS_IN_WORD; ++offset) {
for (offset = 0; offset < BITS_IN_EWORD; ++offset) {
const unsigned char *sha1;
struct revindex_entry *entry;
uint32_t hash = 0;
@ -640,7 +640,7 @@ static void show_objects_for_type(
show_reach(sha1, object_type, 0, hash, bitmap_git.pack, entry->offset);
}
pos += BITS_IN_WORD;
pos += BITS_IN_EWORD;
i++;
}
}
@ -772,7 +772,7 @@ int reuse_partial_packfile_from_bitmap(struct packed_git **packfile,
break;
}
reuse_objects += BITS_IN_WORD;
reuse_objects += BITS_IN_EWORD;
}
#ifdef GIT_BITMAP_DEBUG
@ -995,7 +995,7 @@ static int rebuild_bitmap(uint32_t *reposition,
while (ewah_iterator_next(&word, &it)) {
uint32_t offset, bit_pos;
for (offset = 0; offset < BITS_IN_WORD; ++offset) {
for (offset = 0; offset < BITS_IN_EWORD; ++offset) {
if ((word >> offset) == 0)
break;
@ -1008,7 +1008,7 @@ static int rebuild_bitmap(uint32_t *reposition,
return -1;
}
pos += BITS_IN_WORD;
pos += BITS_IN_EWORD;
}
return 0;
}