Optional: Use nullopt and implicit construction in /modules/audio_coding
Changes places where we explicitly construct an Optional to instead use
nullopt or the requisite value type only.
This CL was uploaded by git cl split.
R=kwiberg@webrtc.org
Bug: None
Change-Id: I055411a3e521964c81100869a197dd92f5608f1b
Reviewed-on: https://webrtc-review.googlesource.com/23619
Commit-Queue: Oskar Sundbom <ossu@webrtc.org>
Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
Reviewed-by: Elad Alon <eladalon@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#20728}
diff --git a/modules/audio_coding/audio_network_adaptor/controller_manager.cc b/modules/audio_coding/audio_network_adaptor/controller_manager.cc
index d573960..313aa62 100644
--- a/modules/audio_coding/audio_network_adaptor/controller_manager.cc
+++ b/modules/audio_coding/audio_network_adaptor/controller_manager.cc
@@ -327,7 +327,7 @@
const std::map<const Controller*, std::pair<int, float>>& scoring_points)
: config_(config),
controllers_(std::move(controllers)),
- last_reordering_time_ms_(rtc::Optional<int64_t>()),
+ last_reordering_time_ms_(rtc::nullopt),
last_scoring_point_(0, 0.0) {
for (auto& controller : controllers_)
default_sorted_controllers_.push_back(controller.get());
@@ -389,7 +389,7 @@
if (sorted_controllers_ != sorted_controllers) {
sorted_controllers_ = sorted_controllers;
- last_reordering_time_ms_ = rtc::Optional<int64_t>(now_ms);
+ last_reordering_time_ms_ = now_ms;
last_scoring_point_ = scoring_point;
}
return sorted_controllers_;