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

Unified Diff: base/rand_util.h

Issue 7685053: Fix variable names and comments in RandGenerator. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: d Created 9 years, 4 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 | « no previous file | base/rand_util.cc » ('j') | base/rand_util.cc » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: base/rand_util.h
diff --git a/base/rand_util.h b/base/rand_util.h
index c98cb4513efc46332b672040324fdaf85ab886bc..afed0913526e1b638a0ae6fa5e53f851c9d81da1 100644
--- a/base/rand_util.h
+++ b/base/rand_util.h
@@ -19,12 +19,12 @@ BASE_EXPORT uint64 RandUint64();
// Returns a random number between min and max (inclusive). Thread-safe.
BASE_EXPORT int RandInt(int min, int max);
-// Returns a random number in range [0, max). Thread-safe.
+// Returns a random number in range [0, n). Thread-safe.
//
// Note that this can be used as an adapter for std::random_shuffle():
// Given a pre-populated |std::vector<int> myvector|, shuffle it as
// std::random_shuffle(myvector.begin(), myvector.end(), base::RandGenerator);
-BASE_EXPORT uint64 RandGenerator(uint64 max);
+BASE_EXPORT uint64 RandGenerator(uint64 n);
Mark Mentovai 2011/08/23 17:01:33 Why did you need to rename this? It was a little m
Denis Lagno 2011/08/24 12:58:28 I consider it being misnomer. There is long tradit
// Returns a random double in range [0, 1). Thread-safe.
BASE_EXPORT double RandDouble();
« no previous file with comments | « no previous file | base/rand_util.cc » ('j') | base/rand_util.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698