Optional: Use nullopt and implicit construction in /sdk/android/src/jni/pc

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.

Bug: None
Change-Id: Idf275495910f651ec35f641611926e62414daa9a
Reviewed-on: https://webrtc-review.googlesource.com/23610
Commit-Queue: Oskar Sundbom <ossu@webrtc.org>
Reviewed-by: Sami Kalliomäki <sakal@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#20972}
This commit is contained in:
Oskar Sundbom 2017-11-30 15:23:00 +01:00 committed by Commit Bot
parent 63b87f4db1
commit 51907f641b
2 changed files with 2 additions and 2 deletions

View File

@ -505,7 +505,7 @@ void JavaToNativeRtpParameters(JNIEnv* jni,
if (!IsNull(jni, j_ssrc)) {
jlong ssrc_value = jni->CallLongMethod(j_ssrc, long_value_id);
CHECK_EXCEPTION(jni) << "error during CallLongMethod";
encoding.ssrc = rtc::Optional<uint32_t>(ssrc_value);
encoding.ssrc = ssrc_value;
}
parameters->encodings.push_back(encoding);
}

View File

@ -418,7 +418,7 @@ JNI_FUNCTION_DECLARATION(jlong,
if (key_type != rtc::KT_DEFAULT) {
rtc::scoped_refptr<rtc::RTCCertificate> certificate =
rtc::RTCCertificateGenerator::GenerateCertificate(
rtc::KeyParams(key_type), rtc::Optional<uint64_t>());
rtc::KeyParams(key_type), rtc::nullopt);
if (!certificate) {
RTC_LOG(LS_ERROR) << "Failed to generate certificate. KeyType: "
<< key_type;