summaryrefslogtreecommitdiff
path: root/chromium/base/numerics/safe_conversions.h
diff options
context:
space:
mode:
Diffstat (limited to 'chromium/base/numerics/safe_conversions.h')
-rw-r--r--chromium/base/numerics/safe_conversions.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/chromium/base/numerics/safe_conversions.h b/chromium/base/numerics/safe_conversions.h
index b9636fec428..b9f81e85b85 100644
--- a/chromium/base/numerics/safe_conversions.h
+++ b/chromium/base/numerics/safe_conversions.h
@@ -170,7 +170,7 @@ struct SaturateFastOp<
std::is_integral<Dst>::value &&
SaturateFastAsmOp<Dst, Src>::is_supported>::type> {
static const bool is_supported = true;
- static Dst Do(Src value) { return SaturateFastAsmOp<Dst, Src>::Do(value); }
+ static constexpr Dst Do(Src value) { return SaturateFastAsmOp<Dst, Src>::Do(value); }
};
template <typename Dst, typename Src>
@@ -181,7 +181,7 @@ struct SaturateFastOp<
std::is_integral<Dst>::value &&
!SaturateFastAsmOp<Dst, Src>::is_supported>::type> {
static const bool is_supported = true;
- static Dst Do(Src value) {
+ static constexpr Dst Do(Src value) {
// The exact order of the following is structured to hit the correct
// optimization heuristics across compilers. Do not change without
// checking the emitted code.