Fix MSVC build issues
Release / release (push) Successful in 16s

This commit is contained in:
abdelrahman committed 2026-10-29 02:15:17 +00:00
1 parent 188cfae0d7
commit 5687cb512c
21 files changed
+108 -27

No files matched your search

+1 -1
View File
@@ -67,7 +67,7 @@ wp_intern void seedOsGenerator(u64 seed) {
seed = (u64)ts.tv_nsec;
}
srand(seed);
srand((u32)seed);
}
wp_intern u64 genRandomNumber(void) {
+4 -1
View File
@@ -13,7 +13,10 @@ WpXor256State wpPrngXorshiftInit(void) {
WpXor256State wpPrngXorshiftInitWithSeed(u64 seed) {
WpSplitmix64State sm64;
if (seed > 0) {
// NOTE (Abdelrahman): Extract into a variable to get rid of MSVC Spectre mitigation warnings
b8 seed_not_zero = seed > 0;
if (seed_not_zero) {
sm64 = wpPrngSplitmix64InitWithSeed(seed);
} else {
sm64 = wpPrngSplitmix64Init();