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

Unified Diff: base/numerics/safe_conversions_impl.h

Issue 1995753003: Cleanup some constexpr nits in base/numerics (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: nit Created 4 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/numerics/safe_conversions.h ('k') | base/numerics/safe_math_impl.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: base/numerics/safe_conversions_impl.h
diff --git a/base/numerics/safe_conversions_impl.h b/base/numerics/safe_conversions_impl.h
index 378fee196a2585768f2d35982907f3c8d1140ba9..9279ecc3fb1e279909da2fa5bc3a23395bdaab7a 100644
--- a/base/numerics/safe_conversions_impl.h
+++ b/base/numerics/safe_conversions_impl.h
@@ -97,8 +97,7 @@ enum RangeConstraint {
};
// Helper function for coercing an int back to a RangeContraint.
-inline constexpr RangeConstraint GetRangeConstraint(
- int integer_range_constraint) {
+constexpr RangeConstraint GetRangeConstraint(int integer_range_constraint) {
// TODO(jschuh): Once we get full C++14 support we want this
// assert(integer_range_constraint >= RANGE_VALID &&
// integer_range_constraint <= RANGE_INVALID)
@@ -252,7 +251,7 @@ struct DstRangeRelationToSrcRangeImpl<Dst,
};
template <typename Dst, typename Src>
-inline constexpr RangeConstraint DstRangeRelationToSrcRange(Src value) {
+constexpr RangeConstraint DstRangeRelationToSrcRange(Src value) {
static_assert(std::numeric_limits<Src>::is_specialized,
"Argument must be numeric.");
static_assert(std::numeric_limits<Dst>::is_specialized,
« no previous file with comments | « base/numerics/safe_conversions.h ('k') | base/numerics/safe_math_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698