From 56f093817d3c71ba032d2df7bafd1cccdbf19768 Mon Sep 17 00:00:00 2001 From: Sam Hocevar Date: Wed, 27 Feb 2013 19:15:19 +0000 Subject: [PATCH] math: don't use the LLU suffix for 64-bit numbers and don't use floorf(). --- src/lol/math/rand.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/lol/math/rand.h b/src/lol/math/rand.h index 8abf7b72..3938904c 100644 --- a/src/lol/math/rand.h +++ b/src/lol/math/rand.h @@ -94,7 +94,7 @@ template static inline T rand() ret = (ret << 8) ^ std::rand(); ret = (ret << 8) ^ std::rand(); } - return static_cast(ret & 0x7fffffffffffffffllu); + return static_cast(ret & (~(uint64_t)0 >> 1)); } default: ASSERT(false, "rand() doesn’t support types of size %d\n",