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

Unified Diff: webrtc/base/rollingaccumulator.h

Issue 2620303003: Replace ASSERT by RTC_DCHECK in all non-test code. (Closed)
Patch Set: Address final nits. Created 3 years, 11 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 | « webrtc/base/proxyserver.cc ('k') | webrtc/base/signalthread.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webrtc/base/rollingaccumulator.h
diff --git a/webrtc/base/rollingaccumulator.h b/webrtc/base/rollingaccumulator.h
index 72415ad758dacb71909b7b7016197a83bc99451b..7a42ff120bd922329fd7dd20e6cb4efe42880ffa 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";
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";
min_ = samples_[next_index_];
for (size_t i = 1u; i < count_; i++) {
min_ = std::min(min_, samples_[(next_index_ + i) % max_count()]);
« no previous file with comments | « webrtc/base/proxyserver.cc ('k') | webrtc/base/signalthread.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698