minor win32 warning removed

metadata
Wenzel Jakob 2011-04-30 14:12:00 -07:00
parent 3e561b2486
commit 56429cc130
1 changed files with 4 additions and 1 deletions

View File

@ -197,8 +197,11 @@ size_t Random::nextSize(size_t n) {
bitmask |= bitmask >> 4;
bitmask |= bitmask >> 8;
bitmask |= bitmask >> 16;
if (sizeof(size_t) == 8)
#if defined(WIN64) || defined(__LINUX__) || defined(__OSX__)
if (sizeof(size_t) > 4)
bitmask |= bitmask >> 32;
#endif
/* Generate numbers until one in [0, n) is found */
while ((result = (size_t) (nextULong() & bitmask)) >= n)