Replace rtc::Optional with absl::optional in modules/audio_coding
This is a no-op change because rtc::Optional is an alias to absl::optional
This CL generated by running script with parameter 'modules/audio_coding'
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: Ic980ee605148fdb160666d4aa03cc87175e48fe8
Reviewed-on: https://webrtc-review.googlesource.com/84130
Reviewed-by: Oskar Sundbom <ossu@webrtc.org>
Commit-Queue: Danil Chapovalov <danilchap@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#23659}
diff --git a/modules/audio_coding/acm2/codec_manager.h b/modules/audio_coding/acm2/codec_manager.h
index 7485426..ffbad96 100644
--- a/modules/audio_coding/acm2/codec_manager.h
+++ b/modules/audio_coding/acm2/codec_manager.h
@@ -13,7 +13,7 @@
#include <map>
-#include "api/optional.h"
+#include "absl/types/optional.h"
#include "common_types.h" // NOLINT(build/include)
#include "modules/audio_coding/acm2/rent_a_codec.h"
#include "modules/audio_coding/include/audio_coding_module.h"
@@ -43,7 +43,7 @@
return send_codec_inst_ ? &*send_codec_inst_ : nullptr;
}
- void UnsetCodecInst() { send_codec_inst_ = rtc::nullopt; }
+ void UnsetCodecInst() { send_codec_inst_ = absl::nullopt; }
const RentACodec::StackParameters* GetStackParams() const {
return &codec_stack_params_;
@@ -63,7 +63,7 @@
private:
rtc::ThreadChecker thread_checker_;
- rtc::Optional<CodecInst> send_codec_inst_;
+ absl::optional<CodecInst> send_codec_inst_;
RentACodec::StackParameters codec_stack_params_;
bool recreate_encoder_ = true; // Need to recreate encoder?