mirror of https://github.com/OpenRCT2/OpenRCT2.git
Remove BitCountInit and handle that with static initialization
This commit is contained in:
parent
a83337b2da
commit
873fff2513
|
@ -48,7 +48,6 @@ namespace Platform
|
|||
Platform::AndroidInitClassLoader();
|
||||
#endif // __ANDROID__
|
||||
|
||||
BitCountInit();
|
||||
MaskInit();
|
||||
}
|
||||
}
|
||||
|
|
|
@ -204,12 +204,7 @@ static int32_t BitCountLut(uint32_t source)
|
|||
+ BitsSetTable256[source >> 24];
|
||||
}
|
||||
|
||||
static int32_t (*BitCountFn)(uint32_t);
|
||||
|
||||
void BitCountInit()
|
||||
{
|
||||
BitCountFn = BitCountPopcntAvailable() ? BitCountPopcnt : BitCountLut;
|
||||
}
|
||||
static const auto BitCountFn = BitCountPopcntAvailable() ? BitCountPopcnt : BitCountLut;
|
||||
|
||||
int32_t BitCount(uint32_t source)
|
||||
{
|
||||
|
|
|
@ -28,7 +28,6 @@ bool AVX2Available();
|
|||
|
||||
int32_t UtilBitScanForward(int32_t source);
|
||||
int32_t UtilBitScanForward(int64_t source);
|
||||
void BitCountInit();
|
||||
int32_t BitCount(uint32_t source);
|
||||
int32_t StrLogicalCmp(char const* a, char const* b);
|
||||
char* SafeStrCpy(char* destination, const char* source, size_t num);
|
||||
|
|
Loading…
Reference in New Issue