Remove an MSVC analyze workaround.
Also, move the DCHECK out of the comma operator.
BUG=427616
Change-Id: Id5aa46c1b5d7976640777f83c9828ee8b02cc0d3
Reviewed-on: https://chromium-review.googlesource.com/683231
Reviewed-by: Bruce Dawson <brucedawson@chromium.org>
Reviewed-by: Yuri Wiitala <miu@chromium.org>
Commit-Queue: Will Harris <wfh@chromium.org>
Cr-Commit-Position: refs/heads/master@{#504301}
diff --git a/base/time/time.h b/base/time/time.h
index 0169be3..2befad3 100644
--- a/base/time/time.h
+++ b/base/time/time.h
@@ -724,18 +724,12 @@
// static
constexpr TimeDelta TimeDelta::FromProduct(int64_t value,
int64_t positive_value) {
- return (
-#if !defined(_PREFAST_) || !defined(OS_WIN)
- // Avoid internal compiler errors in /analyze builds with VS 2015
- // update 3.
- // https://connect.microsoft.com/VisualStudio/feedback/details/2870865
- DCHECK(positive_value > 0),
-#endif
- value > std::numeric_limits<int64_t>::max() / positive_value
- ? Max()
- : value < std::numeric_limits<int64_t>::min() / positive_value
- ? Min()
- : TimeDelta(value * positive_value));
+ DCHECK(positive_value > 0);
+ return value > std::numeric_limits<int64_t>::max() / positive_value
+ ? Max()
+ : value < std::numeric_limits<int64_t>::min() / positive_value
+ ? Min()
+ : TimeDelta(value * positive_value);
}
// For logging use only.