Replace rtc::Optional with absl::optional
This is a no-op change because rtc::Optional is an alias to absl::optional
This CL generated by running script passing top level directories except rtc_base and api
find $@ -type f \( -name \*.h -o -name \*.cc -o -name \*.mm \) \
-exec sed -i 's|rtc::Optional|absl::optional|g' {} \+ \
-exec sed -i 's|rtc::nullopt|absl::nullopt|g' {} \+ \
-exec sed -i 's|#include "api/optional.h"|#include "absl/types/optional.h"|' {} \+
find $@ -type f -name BUILD.gn \
-exec sed -r -i 's|"[\./api]*:optional"|"//third_party/abseil-cpp/absl/types:optional"|' {} \+;
git cl format
Bug: webrtc:9078
Change-Id: I9465c172e65ba6e6ed4e4fdc35b0b265038d6f71
Reviewed-on: https://webrtc-review.googlesource.com/84584
Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
Commit-Queue: Danil Chapovalov <danilchap@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#23697}
diff --git a/common_video/h264/sps_parser.cc b/common_video/h264/sps_parser.cc
index c921972..b313f48 100644
--- a/common_video/h264/sps_parser.cc
+++ b/common_video/h264/sps_parser.cc
@@ -18,7 +18,7 @@
#include "rtc_base/logging.h"
namespace {
-typedef rtc::Optional<webrtc::SpsParser::SpsState> OptionalSps;
+typedef absl::optional<webrtc::SpsParser::SpsState> OptionalSps;
#define RETURN_EMPTY_ON_FAIL(x) \
if (!(x)) { \
@@ -38,14 +38,14 @@
// http://www.itu.int/rec/T-REC-H.264
// Unpack RBSP and parse SPS state from the supplied buffer.
-rtc::Optional<SpsParser::SpsState> SpsParser::ParseSps(const uint8_t* data,
- size_t length) {
+absl::optional<SpsParser::SpsState> SpsParser::ParseSps(const uint8_t* data,
+ size_t length) {
std::vector<uint8_t> unpacked_buffer = H264::ParseRbsp(data, length);
rtc::BitBuffer bit_buffer(unpacked_buffer.data(), unpacked_buffer.size());
return ParseSpsUpToVui(&bit_buffer);
}
-rtc::Optional<SpsParser::SpsState> SpsParser::ParseSpsUpToVui(
+absl::optional<SpsParser::SpsState> SpsParser::ParseSpsUpToVui(
rtc::BitBuffer* buffer) {
// Now, we need to use a bit buffer to parse through the actual AVC SPS
// format. See Section 7.3.2.1.1 ("Sequence parameter set data syntax") of the