1
0
mirror of https://github.com/OpenRCT2/OpenRCT2 synced 2026-01-15 11:03:00 +01:00

Add comment and rename function pointer

This commit is contained in:
Hielke Morsink
2023-01-18 23:02:44 +01:00
parent 0762fcb601
commit 86ffb01ddd
2 changed files with 4 additions and 3 deletions

View File

@@ -204,16 +204,16 @@ static int32_t BitcountLut(uint32_t source)
+ BitsSetTable256[source >> 24];
}
static int32_t (*bitcount_fn)(uint32_t);
static int32_t (*BitCountFn)(uint32_t);
void BitCountInit()
{
bitcount_fn = BitcountPopcntAvailable() ? BitcountPopcnt : BitcountLut;
BitCountFn = BitcountPopcntAvailable() ? BitcountPopcnt : BitcountLut;
}
int32_t BitCount(uint32_t source)
{
return bitcount_fn(source);
return BitCountFn(source);
}
/* Case insensitive logical compare */

View File

@@ -41,6 +41,7 @@ bool UtilGzipCompress(FILE* source, FILE* dest);
std::vector<uint8_t> Gzip(const void* data, const size_t dataLen);
std::vector<uint8_t> Ungzip(const void* data, const size_t dataLen);
// TODO: Make these specialized template functions, or when possible Concepts in C++20
int8_t AddClamp_int8_t(int8_t value, int8_t value_to_add);
int16_t AddClamp_int16_t(int16_t value, int16_t value_to_add);
int32_t AddClamp_int32_t(int32_t value, int32_t value_to_add);