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

Unified Diff: webrtc/modules/remote_bitrate_estimator/test/bwe_test_logging.cc

Issue 2546483002: Change assert to RTC_DCHECK in bwe_test_logging.cc (Closed)
Patch Set: Created 4 years 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 | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webrtc/modules/remote_bitrate_estimator/test/bwe_test_logging.cc
diff --git a/webrtc/modules/remote_bitrate_estimator/test/bwe_test_logging.cc b/webrtc/modules/remote_bitrate_estimator/test/bwe_test_logging.cc
index 12042a834d477cd6a8a943ccace8eb7330a04770..ab6be5aed6aa0759f26977173e452732d8605314 100644
--- a/webrtc/modules/remote_bitrate_estimator/test/bwe_test_logging.cc
+++ b/webrtc/modules/remote_bitrate_estimator/test/bwe_test_logging.cc
@@ -18,6 +18,7 @@
#include <algorithm>
#include <sstream>
+#include "webrtc/base/checks.h"
#include "webrtc/base/format_macros.h"
#include "webrtc/base/platform_thread.h"
#include "webrtc/system_wrappers/include/critical_section_wrapper.h"
@@ -79,7 +80,7 @@ void Logging::SetGlobalEnable(bool enabled) {
void Logging::Log(const char format[], ...) {
CriticalSectionScoped cs(crit_sect_.get());
ThreadMap::iterator it = thread_map_.find(rtc::CurrentThreadId());
- assert(it != thread_map_.end());
+ RTC_DCHECK(it != thread_map_.end());
const State& state = it->second.stack.top();
if (state.enabled) {
printf("%s\t", state.tag.c_str());
@@ -116,7 +117,7 @@ void Logging::Plot(int figure,
const std::string& alg_name) {
CriticalSectionScoped cs(crit_sect_.get());
ThreadMap::iterator it = thread_map_.find(rtc::CurrentThreadId());
- assert(it != thread_map_.end());
+ RTC_DCHECK(it != thread_map_.end());
const State& state = it->second.stack.top();
if (state.enabled) {
printf("PLOT\t%d\t%s:%" PRIu32 "@%s\t%f\t%f\n", figure, name.c_str(), ssrc,
@@ -130,7 +131,7 @@ void Logging::PlotBar(int figure,
int flow_id) {
CriticalSectionScoped cs(crit_sect_.get());
ThreadMap::iterator it = thread_map_.find(rtc::CurrentThreadId());
- assert(it != thread_map_.end());
+ RTC_DCHECK(it != thread_map_.end());
const State& state = it->second.stack.top();
if (state.enabled) {
printf("BAR\t%d\t%s_%d\t%f\n", figure, name.c_str(), flow_id, value);
@@ -143,7 +144,7 @@ void Logging::PlotBaselineBar(int figure,
int flow_id) {
CriticalSectionScoped cs(crit_sect_.get());
ThreadMap::iterator it = thread_map_.find(rtc::CurrentThreadId());
- assert(it != thread_map_.end());
+ RTC_DCHECK(it != thread_map_.end());
const State& state = it->second.stack.top();
if (state.enabled) {
printf("BASELINE\t%d\t%s_%d\t%f\n", figure, name.c_str(), flow_id, value);
@@ -159,7 +160,7 @@ void Logging::PlotErrorBar(int figure,
int flow_id) {
CriticalSectionScoped cs(crit_sect_.get());
ThreadMap::iterator it = thread_map_.find(rtc::CurrentThreadId());
- assert(it != thread_map_.end());
+ RTC_DCHECK(it != thread_map_.end());
const State& state = it->second.stack.top();
if (state.enabled) {
printf("ERRORBAR\t%d\t%s_%d\t%f\t%f\t%f\t%s\n", figure, name.c_str(),
@@ -178,7 +179,7 @@ void Logging::PlotLimitErrorBar(int figure,
int flow_id) {
CriticalSectionScoped cs(crit_sect_.get());
ThreadMap::iterator it = thread_map_.find(rtc::CurrentThreadId());
- assert(it != thread_map_.end());
+ RTC_DCHECK(it != thread_map_.end());
const State& state = it->second.stack.top();
if (state.enabled) {
printf("LIMITERRORBAR\t%d\t%s_%d\t%f\t%f\t%f\t%s\t%f\t%s\n", figure,
@@ -193,7 +194,7 @@ void Logging::PlotLabel(int figure,
int num_flows) {
CriticalSectionScoped cs(crit_sect_.get());
ThreadMap::iterator it = thread_map_.find(rtc::CurrentThreadId());
- assert(it != thread_map_.end());
+ RTC_DCHECK(it != thread_map_.end());
const State& state = it->second.stack.top();
if (state.enabled) {
printf("LABEL\t%d\t%s\t%s\t%d\n", figure, title.c_str(), y_label.c_str(),
@@ -242,7 +243,7 @@ void Logging::PushState(const std::string& append_to_tag, int64_t timestamp_ms,
void Logging::PopState() {
CriticalSectionScoped cs(crit_sect_.get());
ThreadMap::iterator it = thread_map_.find(rtc::CurrentThreadId());
- assert(it != thread_map_.end());
+ RTC_DCHECK(it != thread_map_.end());
std::stack<State>* stack = &it->second.stack;
int64_t newest_timestamp_ms = stack->top().timestamp_ms;
stack->pop();
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698