summaryrefslogtreecommitdiff
path: root/util/random.h
diff options
context:
space:
mode:
authordgrogan@chromium.org <dgrogan@chromium.org@62dab493-f737-651d-591e-8d6aee1b9529>2011-04-20 22:48:11 +0000
committerdgrogan@chromium.org <dgrogan@chromium.org@62dab493-f737-651d-591e-8d6aee1b9529>2011-04-20 22:48:11 +0000
commitba6dac0e809b249532a7465f71a00ccda307161d (patch)
tree9aa494c1bb1bbbefba5bf12c520941dbe4abfec1 /util/random.h
parent69c6d38342a1fab5f7f2921aa2e9c0e60ba90e35 (diff)
downloadleveldb-ba6dac0e809b249532a7465f71a00ccda307161d.tar.gz
@20776309
* env_chromium.cc should not export symbols. * Fix MSVC warnings. * Removed large value support. * Fix broken reference to documentation file git-svn-id: https://leveldb.googlecode.com/svn/trunk@24 62dab493-f737-651d-591e-8d6aee1b9529
Diffstat (limited to 'util/random.h')
-rw-r--r--util/random.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/util/random.h b/util/random.h
index 2d458e8..d886b4e 100644
--- a/util/random.h
+++ b/util/random.h
@@ -29,7 +29,7 @@ class Random {
uint64_t product = seed_ * A;
// Compute (product % M) using the fact that ((x << 31) % M) == x.
- seed_ = (product >> 31) + (product & M);
+ seed_ = static_cast<uint32_t>((product >> 31) + (product & M));
// The first reduction may overflow by 1 bit, so we may need to
// repeat. mod == M is not possible; using > allows the faster
// sign-bit-based test.