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

Unified Diff: webrtc/modules/audio_coding/main/acm2/rent_a_codec.h

Issue 1430433004: Replace rtc::cricket::Settable with rtc::Maybe (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: rebase Created 5 years, 2 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/maybe_unittest.cc ('k') | webrtc/modules/audio_coding/main/acm2/rent_a_codec.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webrtc/modules/audio_coding/main/acm2/rent_a_codec.h
diff --git a/webrtc/modules/audio_coding/main/acm2/rent_a_codec.h b/webrtc/modules/audio_coding/main/acm2/rent_a_codec.h
index 55a5d0361a9958ff050aa872ea18ac9c1304d1d6..02749f7423fbc5500f01af2eb175b546202084d2 100644
--- a/webrtc/modules/audio_coding/main/acm2/rent_a_codec.h
+++ b/webrtc/modules/audio_coding/main/acm2/rent_a_codec.h
@@ -133,12 +133,14 @@ class RentACodec {
static inline rtc::Maybe<int> CodecIndexFromId(CodecId codec_id) {
const int i = static_cast<int>(codec_id);
- return i < static_cast<int>(NumberOfCodecs()) ? i : rtc::Maybe<int>();
+ return i < static_cast<int>(NumberOfCodecs()) ? rtc::Maybe<int>(i)
+ : rtc::Maybe<int>();
}
static inline rtc::Maybe<CodecId> CodecIdFromIndex(int codec_index) {
return static_cast<size_t>(codec_index) < NumberOfCodecs()
- ? static_cast<RentACodec::CodecId>(codec_index)
+ ? rtc::Maybe<RentACodec::CodecId>(
+ static_cast<RentACodec::CodecId>(codec_index))
: rtc::Maybe<RentACodec::CodecId>();
}
« no previous file with comments | « webrtc/base/maybe_unittest.cc ('k') | webrtc/modules/audio_coding/main/acm2/rent_a_codec.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698