diff --git a/modules/remote_bitrate_estimator/aimd_rate_control.cc b/modules/remote_bitrate_estimator/aimd_rate_control.cc index b83a3c6993..288c3d71fe 100644 --- a/modules/remote_bitrate_estimator/aimd_rate_control.cc +++ b/modules/remote_bitrate_estimator/aimd_rate_control.cc @@ -250,10 +250,9 @@ uint32_t AimdRateControl::ChangeBitrate(uint32_t new_bitrate_bps, // If bitrate decreases more than a normal back off after overuse, it // indicates a real network degradation. We do not let such a decrease // to determine the bandwidth estimation period. - last_decrease_ = rtc::Optional(); + last_decrease_ = rtc::nullopt; } else { - last_decrease_ = - rtc::Optional(current_bitrate_bps_ - new_bitrate_bps); + last_decrease_ = current_bitrate_bps_ - new_bitrate_bps; } } if (incoming_bitrate_kbps < diff --git a/modules/remote_bitrate_estimator/aimd_rate_control_unittest.cc b/modules/remote_bitrate_estimator/aimd_rate_control_unittest.cc index 1e894d93d3..f6844b0e94 100644 --- a/modules/remote_bitrate_estimator/aimd_rate_control_unittest.cc +++ b/modules/remote_bitrate_estimator/aimd_rate_control_unittest.cc @@ -45,8 +45,7 @@ void UpdateRateControl(const AimdRateControlStates& states, const BandwidthUsage& bandwidth_usage, int bitrate, int64_t now_ms) { - RateControlInput input(bandwidth_usage, rtc::Optional(bitrate), - now_ms); + RateControlInput input(bandwidth_usage, bitrate, now_ms); states.aimd_rate_control->Update(&input, now_ms); } diff --git a/modules/remote_bitrate_estimator/test/estimators/congestion_window_unittest.cc b/modules/remote_bitrate_estimator/test/estimators/congestion_window_unittest.cc index 3f8760cac7..9b394b7b62 100644 --- a/modules/remote_bitrate_estimator/test/estimators/congestion_window_unittest.cc +++ b/modules/remote_bitrate_estimator/test/estimators/congestion_window_unittest.cc @@ -45,18 +45,17 @@ TEST(CongestionWindowTest, DataInflight) { TEST(CongestionWindowTest, ZeroBandwidthDelayProduct) { CongestionWindow congestion_window; int64_t target_congestion_window = - congestion_window.GetTargetCongestionWindow( - 100, rtc::Optional(0), 2.885f); + congestion_window.GetTargetCongestionWindow(100, 0, 2.885f); EXPECT_EQ(target_congestion_window, 2.885f * kStartingCongestionWindow); } TEST(CongestionWindowTest, CalculateCongestionWindow) { CongestionWindow congestion_window; - int64_t cwnd = congestion_window.GetCongestionWindow( - BbrBweSender::STARTUP, 800000, rtc::Optional(100l), 2.885f); + int64_t cwnd = congestion_window.GetCongestionWindow(BbrBweSender::STARTUP, + 800000, 100l, 2.885f); EXPECT_EQ(cwnd, 28850); - cwnd = congestion_window.GetCongestionWindow( - BbrBweSender::STARTUP, 400000, rtc::Optional(200l), 2.885f); + cwnd = congestion_window.GetCongestionWindow(BbrBweSender::STARTUP, 400000, + 200l, 2.885f); EXPECT_EQ(cwnd, 28850); } } // namespace bwe