Eliminate a pointless IsEnabled helper

Makes code easier to read.

Bug: None
Change-Id: I736f1a152101264184c3d7b1c7a72d1a3b022147
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/362962
Reviewed-by: Emil Lundmark <lndmrk@webrtc.org>
Commit-Queue: Harald Alvestrand <hta@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#43051}
This commit is contained in:
Harald Alvestrand 2024-09-19 11:49:45 +00:00 committed by WebRTC LUCI CQ
parent 2548d224dc
commit e2952a058e

View File

@ -247,10 +247,6 @@ std::optional<int> ComputeSendBitrate(int max_send_bitrate_bps,
}
}
bool IsEnabled(const webrtc::FieldTrialsView& config, absl::string_view trial) {
return absl::StartsWith(config.Lookup(trial), "Enabled");
}
struct AdaptivePtimeConfig {
bool enabled = false;
webrtc::DataRate min_payload_bitrate = webrtc::DataRate::KilobitsPerSec(16);
@ -473,9 +469,9 @@ WebRtcVoiceEngine::WebRtcVoiceEngine(
apm_(audio_processing),
audio_frame_processor_(std::move(audio_frame_processor)),
minimized_remsampling_on_mobile_trial_enabled_(
IsEnabled(trials, "WebRTC-Audio-MinimizeResamplingOnMobile")),
trials.IsEnabled("WebRTC-Audio-MinimizeResamplingOnMobile")),
payload_types_in_transport_trial_enabled_(
IsEnabled(trials, "WebRTC-PayloadTypesInTransport")) {
trials.IsEnabled("WebRTC-PayloadTypesInTransport")) {
RTC_LOG(LS_INFO) << "WebRtcVoiceEngine::WebRtcVoiceEngine";
RTC_DCHECK(decoder_factory);
RTC_DCHECK(encoder_factory);