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

Unified Diff: base/numerics/safe_math.h

Issue 2545303002: Rename CheckNum to MakeCheckedNum (Closed)
Patch Set: Created 4 years 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/numerics/safe_numerics_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: base/numerics/safe_math.h
diff --git a/base/numerics/safe_math.h b/base/numerics/safe_math.h
index 3d765c949a8ed1adb5d3d4655f0f08371ecbc7f4..9b2177f56d19e469b5233756207bce194e80d483 100644
--- a/base/numerics/safe_math.h
+++ b/base/numerics/safe_math.h
@@ -80,8 +80,8 @@ namespace internal {
// CheckedNumeric::Cast<Dst>() - Instance method returning a CheckedNumeric
// derived from casting the current instance to a CheckedNumeric of
// the supplied destination type.
-// CheckNum() - Creates a new CheckedNumeric from the underlying type of the
-// supplied arithmetic, CheckedNumeric, or StrictNumeric type.
+// MakeCheckedNum() - Creates a new CheckedNumeric from the underlying type of
+// the supplied arithmetic, CheckedNumeric, or StrictNumeric type.
//
// Comparison operations are explicitly not supported because they could result
// in a crash on an unexpected CHECK condition. You should use patterns like the
@@ -396,7 +396,7 @@ struct ResultType {
// Convience wrapper to return a new CheckedNumeric from the provided arithmetic
// or CheckedNumericType.
template <typename T>
-constexpr CheckedNumeric<typename UnderlyingType<T>::type> CheckNum(
+constexpr CheckedNumeric<typename UnderlyingType<T>::type> MakeCheckedNum(
const T value) {
return value;
}
@@ -493,7 +493,7 @@ using internal::CheckedNumeric;
using internal::IsValidForType;
using internal::ValueOrDieForType;
using internal::ValueOrDefaultForType;
-using internal::CheckNum;
+using internal::MakeCheckedNum;
using internal::CheckMax;
using internal::CheckMin;
using internal::CheckAdd;
« no previous file with comments | « no previous file | base/numerics/safe_numerics_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698