Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(872)

Unified Diff: base/rand_util.cc

Issue 1128203010: base: Remove the remaining usage GG_(U)INTn_C macros. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: review Created 5 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « base/containers/hash_tables_unittest.cc ('k') | base/strings/string_number_conversions_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: base/rand_util.cc
diff --git a/base/rand_util.cc b/base/rand_util.cc
index 1525b91449d438089a67b89f23521941a80e4500..931eb4e943e646e2f39e2848b33683247b5b4725 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);
« no previous file with comments | « base/containers/hash_tables_unittest.cc ('k') | base/strings/string_number_conversions_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698