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/neteq/tools/neteq_input.h b/modules/audio_coding/neteq/tools/neteq_input.h
index 993ba04..88d9eb9 100644
--- a/modules/audio_coding/neteq/tools/neteq_input.h
+++ b/modules/audio_coding/neteq/tools/neteq_input.h
@@ -52,9 +52,9 @@
const auto b = NextOutputEventTime();
// Return the minimum of non-empty |a| and |b|, or empty if both are empty.
if (a) {
- return b ? rtc::Optional<int64_t>(std::min(*a, *b)) : a;
+ return b ? std::min(*a, *b) : a;
}
- return b ? b : rtc::Optional<int64_t>();
+ return b ? b : rtc::nullopt;
}
// Returns the next packet to be inserted into NetEq. The packet following the