Replace std::string::find() == 0 with absl::StartsWith (part 2).
This CL has been generated using clang-tidy [1] except for changes to BUILD.gn files. [1] - https://clang.llvm.org/extra/clang-tidy/checks/abseil-string-find-startswith.html Bug: None Change-Id: Ibf75601065a53bde28623b8eef57bec067235640 Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/172586 Reviewed-by: Karl Wiberg <kwiberg@webrtc.org> Commit-Queue: Mirko Bonadei <mbonadei@webrtc.org> Cr-Commit-Position: refs/heads/master@{#30984}
This commit is contained in:

committed by
Commit Bot

parent
55c991cc81
commit
06d3559b79
@ -17,6 +17,7 @@
|
||||
#include <string>
|
||||
#include <vector>
|
||||
|
||||
#include "absl/strings/match.h"
|
||||
#include "absl/types/optional.h"
|
||||
#include "api/fec_controller_override.h"
|
||||
#include "api/video/i420_buffer.h"
|
||||
@ -71,7 +72,7 @@ absl::optional<ForcedFallbackParams> ParseFallbackParamsFromFieldTrials(
|
||||
const VideoEncoder& main_encoder) {
|
||||
const std::string field_trial =
|
||||
webrtc::field_trial::FindFullName(kVp8ForceFallbackEncoderFieldTrial);
|
||||
if (field_trial.find("Enabled") != 0) {
|
||||
if (!absl::StartsWith(field_trial, "Enabled")) {
|
||||
return absl::nullopt;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user