Index: webrtc/base/rollingaccumulator.h |
diff --git a/webrtc/base/rollingaccumulator.h b/webrtc/base/rollingaccumulator.h |
index 72415ad758dacb71909b7b7016197a83bc99451b..a4d5d6c29f8b3e056486b1db370be8ae3272e4f9 100644 |
--- a/webrtc/base/rollingaccumulator.h |
+++ b/webrtc/base/rollingaccumulator.h |
@@ -14,6 +14,7 @@ |
#include <algorithm> |
#include <vector> |
+#include "webrtc/base/checks.h" |
#include "webrtc/base/common.h" |
#include "webrtc/base/constructormagic.h" |
@@ -97,8 +98,8 @@ class RollingAccumulator { |
T ComputeMax() const { |
if (max_stale_) { |
- ASSERT(count_ > 0 && |
- "It shouldn't be possible for max_stale_ && count_ == 0"); |
+ RTC_DCHECK(count_ > 0 && |
+ "It shouldn't be possible for max_stale_ && count_ == 0"); |
kwiberg-webrtc
2017/01/12 02:10:41
Remove the message, or use << on the DCHECK.
nisse-webrtc
2017/01/12 10:53:24
Done. Two occurrences.
|
max_ = samples_[next_index_]; |
for (size_t i = 1u; i < count_; i++) { |
max_ = std::max(max_, samples_[(next_index_ + i) % max_count()]); |
@@ -110,8 +111,8 @@ class RollingAccumulator { |
T ComputeMin() const { |
if (min_stale_) { |
- ASSERT(count_ > 0 && |
- "It shouldn't be possible for min_stale_ && count_ == 0"); |
+ RTC_DCHECK(count_ > 0 && |
+ "It shouldn't be possible for min_stale_ && count_ == 0"); |
kwiberg-webrtc
2017/01/12 02:10:41
Ditto.
|
min_ = samples_[next_index_]; |
for (size_t i = 1u; i < count_; i++) { |
min_ = std::min(min_, samples_[(next_index_ + i) % max_count()]); |