remove Popcount_word()

This commit is contained in:
Thomas Bernard
2018-12-10 12:33:11 +01:00
parent 4c1c2f34ad
commit 34c9962e4d
3 changed files with 4 additions and 29 deletions

View File

@@ -839,31 +839,9 @@ double Fround(double n, unsigned d)
return floor(n * exp + 0.5) / exp;
}
/// Count number of bits in a word (16bit).
/// Based on Wikipedia article for Hamming_weight, it's optimized
/// for cases when zeroes are more frequent.
int Popcount_word(word x)
{
word count;
for (count=0; x; count++)
x &= x-1;
return count;
}
/// Count number of bits in a dword (32bit).
/// Based on Wikipedia article for Hamming_weight, it's optimized
/// for cases when zeroes are more frequent.
int Popcount_dword(dword x)
{
dword count;
for (count=0; x; count++)
x &= x-1;
return count;
}
// Fonction retournant le libellé d'une mode (ex: " 320x200")
char * Mode_label(int mode)
const char * Mode_label(int mode)
{
static char str[24];
if (! Video_mode[mode].Fullscreen)