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

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

Issue 2756483002: Use RTC_UNUSED instead of conditional compilation in BWE simulator tool. (Closed)
Patch Set: Attempt static_cast<void>(x) Created 3 years, 9 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
Index: webrtc/modules/remote_bitrate_estimator/test/bwe_test_framework.cc
diff --git a/webrtc/modules/remote_bitrate_estimator/test/bwe_test_framework.cc b/webrtc/modules/remote_bitrate_estimator/test/bwe_test_framework.cc
index b5e00b2ce5902ea62838c92b425d6e710d283099..f9313a6724dd8908b0aa7cd7dc99bd9d8109d9c3 100644
--- a/webrtc/modules/remote_bitrate_estimator/test/bwe_test_framework.cc
+++ b/webrtc/modules/remote_bitrate_estimator/test/bwe_test_framework.cc
@@ -221,11 +221,12 @@ RateCounterFilter::RateCounterFilter(PacketProcessorListener* listener,
packets_per_second_stats_(),
kbps_stats_(),
start_plotting_time_ms_(0),
-#if BWE_TEST_LOGGING_COMPILE_TIME_ENABLE
flow_id_(flow_id),
-#endif
name_(name),
- algorithm_name_(algorithm_name) {}
+ algorithm_name_(algorithm_name) {
+ // Only used when compiling with BWE test logging enabled.
+ RTC_UNUSED(flow_id_);
+}
RateCounterFilter::RateCounterFilter(PacketProcessorListener* listener,
const FlowIds& flow_ids,
@@ -276,7 +277,6 @@ Stats<double> RateCounterFilter::GetBitrateStats() const {
void RateCounterFilter::Plot(int64_t timestamp_ms) {
// TODO(stefan): Reorganize logging configuration to reduce amount
// of preprocessor conditionals in the code.
-#if BWE_TEST_LOGGING_COMPILE_TIME_ENABLE
uint32_t plot_kbps = 0;
if (timestamp_ms >= start_plotting_time_ms_) {
plot_kbps = rate_counter_.bits_per_second() / 1000.0;
@@ -290,7 +290,7 @@ void RateCounterFilter::Plot(int64_t timestamp_ms) {
timestamp_ms, plot_kbps, flow_id_,
algorithm_name_);
}
-#endif
+ RTC_UNUSED(plot_kbps);
}
void RateCounterFilter::RunFor(int64_t /*time_ms*/, Packets* in_out) {

Powered by Google App Engine
This is Rietveld 408576698