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

Unified Diff: webrtc/base/rate_statistics.cc

Issue 2131913003: Revert of Refactor NACK bitrate allocation (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: Created 4 years, 5 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/rate_statistics.h ('k') | webrtc/call/rtc_event_log_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webrtc/base/rate_statistics.cc
diff --git a/webrtc/base/rate_statistics.cc b/webrtc/base/rate_statistics.cc
index 3122dbb3e690611bbaf80b39711e9c336d74b60a..1fd63cc6d2a071251edb0a9f4f3744fd700571f2 100644
--- a/webrtc/base/rate_statistics.cc
+++ b/webrtc/base/rate_statistics.cc
@@ -61,10 +61,8 @@
++num_samples_;
}
-rtc::Optional<uint32_t> RateStatistics::Rate(int64_t now_ms) const {
- // Yeah, this const_cast ain't pretty, but the alternative is to declare most
- // of the members as mutable...
- const_cast<RateStatistics*>(this)->EraseOld(now_ms);
+rtc::Optional<uint32_t> RateStatistics::Rate(int64_t now_ms) {
+ EraseOld(now_ms);
// If window is a single bucket or there is only one sample in a data set that
// has not grown to the full window size, treat this as rate unavailable.
@@ -114,7 +112,7 @@
return true;
}
-bool RateStatistics::IsInitialized() const {
+bool RateStatistics::IsInitialized() {
return oldest_time_ != -max_window_size_ms_;
}
« no previous file with comments | « webrtc/base/rate_statistics.h ('k') | webrtc/call/rtc_event_log_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698