diff options
author | tfarina <tfarina@chromium.org> | 2015-05-18 15:14:09 -0700 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2015-05-18 22:14:16 +0000 |
commit | 3208992c8e765e1fe07c1e77f071f3b0a801952f (patch) | |
tree | 711c211aa2d5ba96b591ae67ef07293fb795b2cb /base/rand_util.cc | |
parent | 6edecc8ca40abd2a82edc78f8d51a1b59543cbca (diff) | |
download | chromium_src-3208992c8e765e1fe07c1e77f071f3b0a801952f.zip chromium_src-3208992c8e765e1fe07c1e77f071f3b0a801952f.tar.gz chromium_src-3208992c8e765e1fe07c1e77f071f3b0a801952f.tar.bz2 |
base: Remove the remaining usage of GG_(U)INTn_C macros.
According to comment in base/port.h, in Chromium, we force-define
__STDC_CONSTANT_MACROS, so we can just use the regular (U)INTn_C macros from
<stdint.h>.
BUG=138542
TEST=base_unittests
R=danakj@chromium.org
Review URL: https://codereview.chromium.org/1128203010
Cr-Commit-Position: refs/heads/master@{#330440}
Diffstat (limited to 'base/rand_util.cc')
-rw-r--r-- | base/rand_util.cc | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/base/rand_util.cc b/base/rand_util.cc index 1525b91..931eb4e 100644 --- a/base/rand_util.cc +++ b/base/rand_util.cc @@ -5,6 +5,7 @@ #include "base/rand_util.h" #include <math.h> +#include <stdint.h> #include <algorithm> #include <limits> @@ -37,7 +38,7 @@ double BitsToOpenEndedUnitInterval(uint64 bits) { COMPILE_ASSERT(std::numeric_limits<double>::radix == 2, otherwise_use_scalbn); static const int kBits = std::numeric_limits<double>::digits; - uint64 random_bits = bits & ((GG_UINT64_C(1) << kBits) - 1); + uint64 random_bits = bits & ((UINT64_C(1) << kBits) - 1); double result = ldexp(static_cast<double>(random_bits), -1 * kBits); DCHECK_GE(result, 0.0); DCHECK_LT(result, 1.0); |