Replace rtc::Optional with absl::optional in api
This is a no-op change because rtc::Optional is an alias to absl::optional
This CL generated by running script with parameter 'api'
Then undo changes to optional target itself and optional_unittests
find $@ -type f \( -name \*.h -o -name \*.cc \) \
-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: I44093da213369d6a502e33792c694f620f53b779
Reviewed-on: https://webrtc-review.googlesource.com/84621
Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
Commit-Queue: Danil Chapovalov <danilchap@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#23707}
diff --git a/api/video_codecs/video_encoder_config.h b/api/video_codecs/video_encoder_config.h
index 636c0e7..47ff925 100644
--- a/api/video_codecs/video_encoder_config.h
+++ b/api/video_codecs/video_encoder_config.h
@@ -14,9 +14,9 @@
#include <string>
#include <vector>
-#include "api/optional.h"
-#include "api/video_codecs/video_codec.h"
+#include "absl/types/optional.h"
#include "api/video_codecs/sdp_video_format.h"
+#include "api/video_codecs/video_codec.h"
#include "rtc_base/refcount.h"
#include "rtc_base/scoped_ref_ptr.h"
@@ -37,9 +37,9 @@
int max_bitrate_bps;
int max_qp;
- rtc::Optional<size_t> num_temporal_layers;
+ absl::optional<size_t> num_temporal_layers;
- rtc::Optional<double> bitrate_priority;
+ absl::optional<double> bitrate_priority;
// TODO(bugs.webrtc.org/8653): Support active per-simulcast layer.
bool active;
@@ -50,7 +50,7 @@
// These are reference counted to permit copying VideoEncoderConfig and be
// kept alive until all encoder_specific_settings go out of scope.
// TODO(kthelgason): Consider removing the need for copying VideoEncoderConfig
- // and use rtc::Optional for encoder_specific_settings instead.
+ // and use absl::optional for encoder_specific_settings instead.
class EncoderSpecificSettings : public rtc::RefCountInterface {
public:
// TODO(pbos): Remove FillEncoderSpecificSettings as soon as VideoCodec is