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:
@@ -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 */
|
||||
|
||||
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user