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

Unified Diff: webrtc/modules/audio_coding/main/acm2/audio_coding_module.cc

Issue 1432553007: Rename Maybe to Optional (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: rebase Created 5 years, 1 month 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
Index: webrtc/modules/audio_coding/main/acm2/audio_coding_module.cc
diff --git a/webrtc/modules/audio_coding/main/acm2/audio_coding_module.cc b/webrtc/modules/audio_coding/main/acm2/audio_coding_module.cc
index 77ee0f27898747bcc0fb8a36e3733067cbb12925..889d62092a03965bf2c2601b1fa31c8191f53ab2 100644
--- a/webrtc/modules/audio_coding/main/acm2/audio_coding_module.cc
+++ b/webrtc/modules/audio_coding/main/acm2/audio_coding_module.cc
@@ -57,7 +57,7 @@ int AudioCodingModule::Codec(const char* payload_name,
CodecInst* codec,
int sampling_freq_hz,
int channels) {
- rtc::Maybe<CodecInst> ci = acm2::RentACodec::CodecInstByParams(
+ rtc::Optional<CodecInst> ci = acm2::RentACodec::CodecInstByParams(
payload_name, sampling_freq_hz, channels);
if (ci) {
*codec = *ci;
@@ -77,11 +77,12 @@ int AudioCodingModule::Codec(const char* payload_name,
int AudioCodingModule::Codec(const char* payload_name,
int sampling_freq_hz,
int channels) {
- rtc::Maybe<acm2::RentACodec::CodecId> ci = acm2::RentACodec::CodecIdByParams(
- payload_name, sampling_freq_hz, channels);
+ rtc::Optional<acm2::RentACodec::CodecId> ci =
+ acm2::RentACodec::CodecIdByParams(payload_name, sampling_freq_hz,
+ channels);
if (!ci)
return -1;
- rtc::Maybe<int> i = acm2::RentACodec::CodecIndexFromId(*ci);
+ rtc::Optional<int> i = acm2::RentACodec::CodecIndexFromId(*ci);
return i ? *i : -1;
}

Powered by Google App Engine
This is Rietveld 408576698