Replace RTC_FALLTHROUGH with ABSL_FALLTHROUGH_INTENTED
Bug: None
Change-Id: I7287403f3fb13b8e30f92ca3cf1882b03bb53a6e
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/166176
Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
Commit-Queue: Danil Chapovalov <danilchap@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#30283}
diff --git a/api/video/BUILD.gn b/api/video/BUILD.gn
index 4070f0b..aaa0d56 100644
--- a/api/video/BUILD.gn
+++ b/api/video/BUILD.gn
@@ -58,9 +58,7 @@
rtc_source_set("recordable_encoded_frame") {
visibility = [ "*" ]
- sources = [
- "recordable_encoded_frame.h",
- ]
+ sources = [ "recordable_encoded_frame.h" ]
deps = [
":encoded_image",
@@ -75,9 +73,7 @@
rtc_source_set("video_frame_type") {
visibility = [ "*" ]
- sources = [
- "video_frame_type.h",
- ]
+ sources = [ "video_frame_type.h" ]
}
rtc_library("video_frame_i420") {
@@ -146,16 +142,12 @@
"encoded_frame.h",
]
- deps = [
- "../../modules/video_coding:encoded_frame",
- ]
+ deps = [ "../../modules/video_coding:encoded_frame" ]
}
rtc_source_set("video_codec_constants") {
visibility = [ "*" ]
- sources = [
- "video_codec_constants.h",
- ]
+ sources = [ "video_codec_constants.h" ]
deps = []
}
@@ -189,9 +181,7 @@
rtc_source_set("video_bitrate_allocator_factory") {
visibility = [ "*" ]
- sources = [
- "video_bitrate_allocator_factory.h",
- ]
+ sources = [ "video_bitrate_allocator_factory.h" ]
deps = [
":video_bitrate_allocator",
"../../rtc_base:rtc_base_approved",
@@ -201,9 +191,7 @@
rtc_source_set("video_stream_decoder") {
visibility = [ "*" ]
- sources = [
- "video_stream_decoder.h",
- ]
+ sources = [ "video_stream_decoder.h" ]
deps = [
":encoded_frame",
@@ -288,17 +276,15 @@
"../../media:rtc_media_base",
"../../modules/video_coding:video_coding_utility",
"../../modules/video_coding:webrtc_vp9_helpers",
- "../../rtc_base/system:fallthrough",
"../video_codecs:video_codecs_api",
+ "//third_party/abseil-cpp/absl/base:core_headers",
]
}
if (rtc_include_tests) {
rtc_library("video_unittests") {
testonly = true
- sources = [
- "video_stream_decoder_create_unittest.cc",
- ]
+ sources = [ "video_stream_decoder_create_unittest.cc" ]
deps = [
":video_stream_decoder_create",
"../../test:test_support",
diff --git a/api/video/builtin_video_bitrate_allocator_factory.cc b/api/video/builtin_video_bitrate_allocator_factory.cc
index b2c15a1..bdf7bd6 100644
--- a/api/video/builtin_video_bitrate_allocator_factory.cc
+++ b/api/video/builtin_video_bitrate_allocator_factory.cc
@@ -12,12 +12,12 @@
#include <memory>
+#include "absl/base/macros.h"
#include "api/video/video_bitrate_allocator.h"
#include "api/video_codecs/video_codec.h"
#include "modules/video_coding/codecs/vp9/svc_rate_allocator.h"
#include "modules/video_coding/utility/default_video_bitrate_allocator.h"
#include "modules/video_coding/utility/simulcast_rate_allocator.h"
-#include "rtc_base/system/fallthrough.h"
namespace webrtc {
@@ -34,7 +34,7 @@
std::unique_ptr<VideoBitrateAllocator> rate_allocator;
switch (codec.codecType) {
case kVideoCodecVP8:
- RTC_FALLTHROUGH();
+ ABSL_FALLTHROUGH_INTENDED;
case kVideoCodecH264:
rate_allocator.reset(new SimulcastRateAllocator(codec));
break;
diff --git a/api/video_codecs/BUILD.gn b/api/video_codecs/BUILD.gn
index 6c64e22..5a16e6b 100644
--- a/api/video_codecs/BUILD.gn
+++ b/api/video_codecs/BUILD.gn
@@ -58,12 +58,8 @@
rtc_source_set("bitstream_parser_api") {
visibility = [ "*" ]
- sources = [
- "bitstream_parser.h",
- ]
- deps = [
- "..:array_view",
- ]
+ sources = [ "bitstream_parser.h" ]
+ deps = [ "..:array_view" ]
}
rtc_library("builtin_video_decoder_factory") {
@@ -143,13 +139,13 @@
"../../modules/video_coding:video_codec_interface",
"../../rtc_base:checks",
"../../rtc_base:rtc_base_approved",
- "../../rtc_base/system:fallthrough",
"../../rtc_base/system:rtc_export",
"../../system_wrappers:field_trial",
"../video:encoded_image",
"../video:video_bitrate_allocation",
"../video:video_frame",
"../video:video_rtp_headers",
+ "//third_party/abseil-cpp/absl/base:core_headers",
"//third_party/abseil-cpp/absl/types:optional",
]
}
diff --git a/api/video_codecs/video_decoder_software_fallback_wrapper.cc b/api/video_codecs/video_decoder_software_fallback_wrapper.cc
index 53b2413..3987db6 100644
--- a/api/video_codecs/video_decoder_software_fallback_wrapper.cc
+++ b/api/video_codecs/video_decoder_software_fallback_wrapper.cc
@@ -16,12 +16,12 @@
#include <string>
#include <utility>
+#include "absl/base/macros.h"
#include "api/video/encoded_image.h"
#include "api/video_codecs/video_codec.h"
#include "modules/video_coding/include/video_error_codes.h"
#include "rtc_base/checks.h"
#include "rtc_base/logging.h"
-#include "rtc_base/system/fallthrough.h"
#include "rtc_base/trace_event.h"
#include "system_wrappers/include/field_trial.h"
@@ -166,7 +166,7 @@
}
// Fallback decoder initialized, fall-through.
- RTC_FALLTHROUGH();
+ ABSL_FALLTHROUGH_INTENDED;
}
case DecoderType::kFallback:
return fallback_decoder_->Decode(input_image, missing_frames,
diff --git a/modules/audio_coding/BUILD.gn b/modules/audio_coding/BUILD.gn
index 3935105..669deeb 100644
--- a/modules/audio_coding/BUILD.gn
+++ b/modules/audio_coding/BUILD.gn
@@ -16,12 +16,8 @@
rtc_source_set("audio_coding_module_typedefs") {
visibility += [ "*" ]
- sources = [
- "include/audio_coding_module_typedefs.h",
- ]
- deps = [
- "../../rtc_base:deprecation",
- ]
+ sources = [ "include/audio_coding_module_typedefs.h" ]
+ deps = [ "../../rtc_base:deprecation" ]
}
rtc_library("audio_coding") {
@@ -144,9 +140,7 @@
"../../rtc_base:checks",
"../../rtc_base:rtc_base_approved",
]
- public_deps = [
- ":g711_c",
- ]
+ public_deps = [ ":g711_c" ] # no-presubmit-check TODO(webrtc:8603)
}
rtc_library("g711_c") {
@@ -155,9 +149,7 @@
"codecs/g711/g711_interface.c",
"codecs/g711/g711_interface.h",
]
- deps = [
- "../third_party/g711:g711_3p",
- ]
+ deps = [ "../third_party/g711:g711_3p" ]
}
rtc_library("g722") {
@@ -178,9 +170,7 @@
"../../rtc_base:checks",
"../../rtc_base:rtc_base_approved",
]
- public_deps = [
- ":g722_c",
- ]
+ public_deps = [ ":g722_c" ] # no-presubmit-check TODO(webrtc:8603)
}
rtc_library("g722_c") {
@@ -189,9 +179,7 @@
"codecs/g722/g722_interface.c",
"codecs/g722/g722_interface.h",
]
- deps = [
- "../third_party/g722:g722_3p",
- ]
+ deps = [ "../third_party/g722:g722_3p" ]
}
rtc_library("ilbc") {
@@ -213,9 +201,7 @@
"../../rtc_base:checks",
"../../rtc_base:rtc_base_approved",
]
- public_deps = [
- ":ilbc_c",
- ]
+ public_deps = [ ":ilbc_c" ] # no-presubmit-check TODO(webrtc:8603)
}
rtc_library("ilbc_c") {
@@ -406,15 +392,11 @@
":isac_common",
"../../api/audio_codecs:audio_codecs_api",
]
- public_deps = [
- ":isac_c",
- ]
+ public_deps = [ ":isac_c" ] # no-presubmit-check TODO(webrtc:8603)
}
rtc_source_set("isac_bwinfo") {
- sources = [
- "codecs/isac/bandwidth_info.h",
- ]
+ sources = [ "codecs/isac/bandwidth_info.h" ]
deps = []
}
@@ -517,9 +499,7 @@
"../../common_audio",
"../../system_wrappers",
]
- public_deps = [
- ":isac_fix_c",
- ]
+ public_deps = [ ":isac_fix_c" ] # no-presubmit-check TODO(webrtc:8603)
if (rtc_build_with_neon) {
deps += [ ":isac_neon" ]
@@ -618,9 +598,7 @@
"../third_party/fft",
]
- public_deps = [
- ":isac_fix_common",
- ]
+ public_deps = [ ":isac_fix_common" ] # no-presubmit-check TODO(webrtc:8603)
if (rtc_build_with_neon) {
deps += [ ":isac_neon" ]
@@ -713,9 +691,7 @@
"../../rtc_base:checks",
"../../rtc_base:rtc_base_approved",
]
- public_deps = [
- ":pcm16b_c",
- ]
+ public_deps = [ ":pcm16b_c" ] # no-presubmit-check TODO(webrtc:8603)
}
rtc_library("pcm16b_c") {
@@ -768,9 +744,7 @@
"//third_party/abseil-cpp/absl/strings",
"//third_party/abseil-cpp/absl/types:optional",
]
- public_deps = [ # no-presubmit-check TODO(webrtc:8603)
- ":webrtc_opus_wrapper",
- ]
+ public_deps = [ ":webrtc_opus_wrapper" ] # no-presubmit-check TODO(webrtc:8603)
defines = audio_codec_defines
@@ -806,9 +780,7 @@
"//third_party/abseil-cpp/absl/strings",
"//third_party/abseil-cpp/absl/types:optional",
]
- public_deps = [ # no-presubmit-check TODO(webrtc:8603)
- ":webrtc_opus_wrapper",
- ]
+ public_deps = [ ":webrtc_opus_wrapper" ] # no-presubmit-check TODO(webrtc:8603)
defines = audio_codec_defines
@@ -830,9 +802,7 @@
defines = audio_coding_defines
if (rtc_build_opus) {
- public_deps = [
- rtc_opus_dir,
- ]
+ public_deps = [ rtc_opus_dir ] # no-presubmit-check TODO(webrtc:8603)
} else if (build_with_mozilla) {
include_dirs = [ getenv("DIST") + "/include/opus" ]
}
@@ -848,17 +818,13 @@
if (rtc_enable_protobuf) {
proto_library("ana_debug_dump_proto") {
visibility += webrtc_default_visibility
- sources = [
- "audio_network_adaptor/debug_dump.proto",
- ]
+ sources = [ "audio_network_adaptor/debug_dump.proto" ]
link_deps = [ ":ana_config_proto" ]
proto_out_dir = "modules/audio_coding/audio_network_adaptor"
}
proto_library("ana_config_proto") {
visibility += [ "*" ]
- sources = [
- "audio_network_adaptor/config.proto",
- ]
+ sources = [ "audio_network_adaptor/config.proto" ]
proto_out_dir = "modules/audio_coding/audio_network_adaptor"
}
}
@@ -869,9 +835,7 @@
"audio_network_adaptor/audio_network_adaptor_config.cc",
"audio_network_adaptor/include/audio_network_adaptor_config.h",
]
- deps = [
- "//third_party/abseil-cpp/absl/types:optional",
- ]
+ deps = [ "//third_party/abseil-cpp/absl/types:optional" ]
}
rtc_library("audio_network_adaptor") {
@@ -901,9 +865,7 @@
"audio_network_adaptor/util/threshold_curve.h",
]
- public_deps = [
- ":audio_network_adaptor_config",
- ]
+ public_deps = [ ":audio_network_adaptor_config" ] # no-presubmit-check TODO(webrtc:8603)
deps = [
"../../api/audio_codecs:audio_codecs_api",
@@ -1016,7 +978,6 @@
"../../rtc_base:safe_minmax",
"../../rtc_base:sanitizer",
"../../rtc_base/experiments:field_trial_parser",
- "../../rtc_base/system:fallthrough",
"../../system_wrappers",
"../../system_wrappers:field_trial",
"../../system_wrappers:metrics",
@@ -1199,9 +1160,7 @@
"../rtp_rtcp:rtp_rtcp_format",
"//third_party/abseil-cpp/absl/types:optional",
]
- public_deps = [
- "../../logging:rtc_event_log_proto",
- ]
+ public_deps = [ "../../logging:rtc_event_log_proto" ] # no-presubmit-check TODO(webrtc:8603)
}
# Only used for test purpose. Since we want to use it from chromium
@@ -1209,9 +1168,7 @@
# under rtc_include_tests.
proto_library("neteq_unittest_proto") {
testonly = true
- sources = [
- "neteq/neteq_unittest.proto",
- ]
+ sources = [ "neteq/neteq_unittest.proto" ]
proto_out_dir = "modules/audio_coding/neteq"
}
}
@@ -1480,17 +1437,13 @@
bundle_data("audio_decoder_unittests_bundle_data") {
testonly = true
sources = audio_decoder_unittests_resources
- outputs = [
- "{{bundle_resources_dir}}/{{source_file_part}}",
- ]
+ outputs = [ "{{bundle_resources_dir}}/{{source_file_part}}" ]
}
}
rtc_test("audio_decoder_unittests") {
testonly = true
- sources = [
- "neteq/audio_decoder_unittest.cc",
- ]
+ sources = [ "neteq/audio_decoder_unittest.cc" ]
defines = neteq_defines
@@ -1564,9 +1517,7 @@
"//third_party/abseil-cpp/absl/strings",
"//third_party/abseil-cpp/absl/types:optional",
]
- sources = [
- "neteq/tools/neteq_rtpplay.cc",
- ]
+ sources = [ "neteq/tools/neteq_rtpplay.cc" ]
}
}
@@ -1580,18 +1531,14 @@
bundle_data("audio_codec_speed_tests_data") {
testonly = true
sources = audio_codec_speed_tests_resources
- outputs = [
- "{{bundle_resources_dir}}/{{source_file_part}}",
- ]
+ outputs = [ "{{bundle_resources_dir}}/{{source_file_part}}" ]
}
}
rtc_test("audio_codec_speed_tests") {
testonly = true
defines = []
- deps = [
- "../../test:fileutils",
- ]
+ deps = [ "../../test:fileutils" ]
sources = [
"codecs/isac/fix/test/isac_speed_test.cc",
"codecs/opus/opus_speed_test.cc",
@@ -1688,9 +1635,7 @@
"../../rtc_base:safe_conversions",
]
- sources = [
- "neteq/tools/rtp_encode.cc",
- ]
+ sources = [ "neteq/tools/rtp_encode.cc" ]
defines = audio_coding_defines
}
@@ -1704,9 +1649,7 @@
"../../rtc_base:rtc_base_approved",
]
- sources = [
- "neteq/tools/rtp_jitter.cc",
- ]
+ sources = [ "neteq/tools/rtp_jitter.cc" ]
defines = audio_coding_defines
}
@@ -1714,9 +1657,7 @@
rtc_executable("rtpcat") {
testonly = true
- sources = [
- "neteq/tools/rtpcat.cc",
- ]
+ sources = [ "neteq/tools/rtpcat.cc" ]
deps = [
"../../rtc_base:checks",
@@ -1729,9 +1670,7 @@
rtc_executable("rtp_analyze") {
testonly = true
- sources = [
- "neteq/tools/rtp_analyze.cc",
- ]
+ sources = [ "neteq/tools/rtp_analyze.cc" ]
deps = [
":neteq",
@@ -1746,9 +1685,7 @@
rtc_executable("neteq_opus_quality_test") {
testonly = true
- sources = [
- "neteq/test/neteq_opus_quality_test.cc",
- ]
+ sources = [ "neteq/test/neteq_opus_quality_test.cc" ]
deps = [
":neteq",
@@ -1765,9 +1702,7 @@
rtc_executable("neteq_speed_test") {
testonly = true
- sources = [
- "neteq/test/neteq_speed_test.cc",
- ]
+ sources = [ "neteq/test/neteq_speed_test.cc" ]
deps = [
":neteq",
@@ -1782,9 +1717,7 @@
rtc_executable("neteq_ilbc_quality_test") {
testonly = true
- sources = [
- "neteq/test/neteq_ilbc_quality_test.cc",
- ]
+ sources = [ "neteq/test/neteq_ilbc_quality_test.cc" ]
deps = [
":ilbc",
@@ -1803,9 +1736,7 @@
rtc_executable("neteq_isac_quality_test") {
testonly = true
- sources = [
- "neteq/test/neteq_isac_quality_test.cc",
- ]
+ sources = [ "neteq/test/neteq_isac_quality_test.cc" ]
deps = [
":isac_fix",
@@ -1821,9 +1752,7 @@
rtc_executable("neteq_pcmu_quality_test") {
testonly = true
- sources = [
- "neteq/test/neteq_pcmu_quality_test.cc",
- ]
+ sources = [ "neteq/test/neteq_pcmu_quality_test.cc" ]
deps = [
":g711",
@@ -1841,9 +1770,7 @@
rtc_executable("neteq_pcm16b_quality_test") {
testonly = true
- sources = [
- "neteq/test/neteq_pcm16b_quality_test.cc",
- ]
+ sources = [ "neteq/test/neteq_pcm16b_quality_test.cc" ]
deps = [
":neteq",
@@ -1861,9 +1788,7 @@
rtc_executable("isac_fix_test") {
testonly = true
- sources = [
- "codecs/isac/fix/test/kenny.cc",
- ]
+ sources = [ "codecs/isac/fix/test/kenny.cc" ]
deps = [
":isac_fix",
@@ -1871,9 +1796,7 @@
"../../test:test_support",
]
- data = [
- "../../resources/speech_and_misc_wb.pcm",
- ]
+ data = [ "../../resources/speech_and_misc_wb.pcm" ]
}
rtc_library("isac_test_util") {
@@ -1887,9 +1810,7 @@
rtc_executable("isac_test") {
testonly = true
- sources = [
- "codecs/isac/main/test/simpleKenny.c",
- ]
+ sources = [ "codecs/isac/main/test/simpleKenny.c" ]
deps = [
":isac",
@@ -1901,33 +1822,23 @@
rtc_executable("g711_test") {
testonly = true
- sources = [
- "codecs/g711/test/testG711.cc",
- ]
+ sources = [ "codecs/g711/test/testG711.cc" ]
- deps = [
- ":g711",
- ]
+ deps = [ ":g711" ]
}
rtc_executable("g722_test") {
testonly = true
- sources = [
- "codecs/g722/test/testG722.cc",
- ]
+ sources = [ "codecs/g722/test/testG722.cc" ]
- deps = [
- ":g722",
- ]
+ deps = [ ":g722" ]
}
rtc_executable("isac_api_test") {
testonly = true
- sources = [
- "codecs/isac/main/test/ReleaseTest-API/ReleaseTest-API.cc",
- ]
+ sources = [ "codecs/isac/main/test/ReleaseTest-API/ReleaseTest-API.cc" ]
deps = [
":isac",
@@ -1939,9 +1850,7 @@
rtc_executable("isac_switch_samprate_test") {
testonly = true
- sources = [
- "codecs/isac/main/test/SwitchingSampRate/SwitchingSampRate.cc",
- ]
+ sources = [ "codecs/isac/main/test/SwitchingSampRate/SwitchingSampRate.cc" ]
deps = [
":isac",
@@ -1954,21 +1863,15 @@
rtc_executable("ilbc_test") {
testonly = true
- sources = [
- "codecs/ilbc/test/iLBC_test.c",
- ]
+ sources = [ "codecs/ilbc/test/iLBC_test.c" ]
- deps = [
- ":ilbc",
- ]
+ deps = [ ":ilbc" ]
}
rtc_executable("webrtc_opus_fec_test") {
testonly = true
- sources = [
- "codecs/opus/opus_fec_test.cc",
- ]
+ sources = [ "codecs/opus/opus_fec_test.cc" ]
deps = [
":webrtc_opus",
@@ -2147,12 +2050,8 @@
# TODO(kwiberg): Remove this.
rtc_source_set("audio_decoder_interface") {
visibility += [ "*" ]
- sources = [
- "codecs/audio_decoder.h",
- ]
- deps = [
- "../../api/audio_codecs:audio_codecs_api",
- ]
+ sources = [ "codecs/audio_decoder.h" ]
+ deps = [ "../../api/audio_codecs:audio_codecs_api" ]
}
# For backwards compatibility only! Use
@@ -2160,10 +2059,6 @@
# TODO(ossu): Remove this.
rtc_source_set("audio_encoder_interface") {
visibility += [ "*" ]
- sources = [
- "codecs/audio_encoder.h",
- ]
- deps = [
- "../../api/audio_codecs:audio_codecs_api",
- ]
+ sources = [ "codecs/audio_encoder.h" ]
+ deps = [ "../../api/audio_codecs:audio_codecs_api" ]
}
diff --git a/modules/congestion_controller/bbr/BUILD.gn b/modules/congestion_controller/bbr/BUILD.gn
index a17307f..bc9d78f 100644
--- a/modules/congestion_controller/bbr/BUILD.gn
+++ b/modules/congestion_controller/bbr/BUILD.gn
@@ -36,8 +36,8 @@
"../../../rtc_base:checks",
"../../../rtc_base:rtc_base_approved",
"../../../rtc_base/experiments:field_trial_parser",
- "../../../rtc_base/system:fallthrough",
"../../../system_wrappers:field_trial",
+ "//third_party/abseil-cpp/absl/base:core_headers",
"//third_party/abseil-cpp/absl/types:optional",
]
}
@@ -77,12 +77,8 @@
rtc_source_set("packet_number_indexed_queue") {
visibility = [ ":*" ]
- sources = [
- "packet_number_indexed_queue.h",
- ]
- deps = [
- "../../../rtc_base:checks",
- ]
+ sources = [ "packet_number_indexed_queue.h" ]
+ deps = [ "../../../rtc_base:checks" ]
}
rtc_library("loss_rate_filter") {
@@ -91,9 +87,7 @@
"loss_rate_filter.cc",
"loss_rate_filter.h",
]
- deps = [
- "//third_party/abseil-cpp/absl/types:optional",
- ]
+ deps = [ "//third_party/abseil-cpp/absl/types:optional" ]
}
rtc_library("rtt_stats") {
visibility = [ ":*" ]
@@ -110,9 +104,7 @@
}
rtc_source_set("windowed_filter") {
visibility = [ ":*" ]
- sources = [
- "windowed_filter.h",
- ]
+ sources = [ "windowed_filter.h" ]
}
if (rtc_include_tests) {
rtc_library("bbr_unittests") {
diff --git a/modules/congestion_controller/bbr/bbr_network_controller.cc b/modules/congestion_controller/bbr/bbr_network_controller.cc
index 6d66af12..ad08541 100644
--- a/modules/congestion_controller/bbr/bbr_network_controller.cc
+++ b/modules/congestion_controller/bbr/bbr_network_controller.cc
@@ -15,9 +15,9 @@
#include <string>
#include <vector>
+#include "absl/base/macros.h"
#include "rtc_base/checks.h"
#include "rtc_base/logging.h"
-#include "rtc_base/system/fallthrough.h"
#include "system_wrappers/include/field_trial.h"
namespace webrtc {
@@ -784,7 +784,7 @@
if (is_round_start) {
recovery_state_ = GROWTH;
}
- RTC_FALLTHROUGH();
+ ABSL_FALLTHROUGH_INTENDED;
case GROWTH:
// Exit recovery if appropriate.
if (!has_losses &&
diff --git a/modules/rtp_rtcp/BUILD.gn b/modules/rtp_rtcp/BUILD.gn
index 30769e2..fcf013d 100644
--- a/modules/rtp_rtcp/BUILD.gn
+++ b/modules/rtp_rtcp/BUILD.gn
@@ -277,13 +277,13 @@
"../../rtc_base:rtc_numerics",
"../../rtc_base:safe_minmax",
"../../rtc_base/synchronization:sequence_checker",
- "../../rtc_base/system:fallthrough",
"../../rtc_base/time:timestamp_extrapolator",
"../../system_wrappers",
"../../system_wrappers:metrics",
"../remote_bitrate_estimator",
"../video_coding:codec_globals_headers",
"//third_party/abseil-cpp/absl/algorithm:container",
+ "//third_party/abseil-cpp/absl/base:core_headers",
"//third_party/abseil-cpp/absl/container:inlined_vector",
"//third_party/abseil-cpp/absl/memory",
"//third_party/abseil-cpp/absl/strings",
@@ -404,9 +404,7 @@
rtc_library("rtp_rtcp_modules_tests") {
testonly = true
- sources = [
- "test/testFec/test_fec.cc",
- ]
+ sources = [ "test/testFec/test_fec.cc" ]
deps = [
":rtp_rtcp",
":rtp_rtcp_format",
diff --git a/modules/rtp_rtcp/source/rtp_format_h264.cc b/modules/rtp_rtcp/source/rtp_format_h264.cc
index 394d037..6f19e38 100644
--- a/modules/rtp_rtcp/source/rtp_format_h264.cc
+++ b/modules/rtp_rtcp/source/rtp_format_h264.cc
@@ -30,7 +30,6 @@
#include "modules/rtp_rtcp/source/rtp_packet_to_send.h"
#include "rtc_base/checks.h"
#include "rtc_base/logging.h"
-#include "rtc_base/system/fallthrough.h"
namespace webrtc {
namespace {
diff --git a/modules/rtp_rtcp/source/video_rtp_depacketizer_h264.cc b/modules/rtp_rtcp/source/video_rtp_depacketizer_h264.cc
index a0bd8fb..1378802 100644
--- a/modules/rtp_rtcp/source/video_rtp_depacketizer_h264.cc
+++ b/modules/rtp_rtcp/source/video_rtp_depacketizer_h264.cc
@@ -15,6 +15,7 @@
#include <utility>
#include <vector>
+#include "absl/base/macros.h"
#include "absl/types/optional.h"
#include "absl/types/variant.h"
#include "common_video/h264/h264_common.h"
@@ -26,7 +27,6 @@
#include "rtc_base/checks.h"
#include "rtc_base/copy_on_write_buffer.h"
#include "rtc_base/logging.h"
-#include "rtc_base/system/fallthrough.h"
namespace webrtc {
namespace {
@@ -197,7 +197,7 @@
case H264::NaluType::kIdr:
parsed_payload->video_header.frame_type =
VideoFrameType::kVideoFrameKey;
- RTC_FALLTHROUGH();
+ ABSL_FALLTHROUGH_INTENDED;
case H264::NaluType::kSlice: {
absl::optional<uint32_t> pps_id = PpsParser::ParsePpsIdFromSlice(
&payload_data[start_offset], end_offset - start_offset);
diff --git a/modules/video_coding/BUILD.gn b/modules/video_coding/BUILD.gn
index 5716181..fd096f8 100644
--- a/modules/video_coding/BUILD.gn
+++ b/modules/video_coding/BUILD.gn
@@ -152,7 +152,6 @@
"../../rtc_base/experiments:rate_control_settings",
"../../rtc_base/experiments:rtt_mult_experiment",
"../../rtc_base/synchronization:sequence_checker",
- "../../rtc_base/system:fallthrough",
"../../rtc_base/task_utils:repeating_task",
"../../rtc_base/third_party/base64",
"../../rtc_base/time:timestamp_extrapolator",
@@ -249,9 +248,7 @@
"codecs/vp9/include/vp9_globals.h",
]
- deps = [
- "../../rtc_base:checks",
- ]
+ deps = [ "../../rtc_base:checks" ]
}
rtc_library("video_coding_utility") {
@@ -672,9 +669,7 @@
bundle_data("video_coding_modules_tests_resources_bundle_data") {
testonly = true
sources = video_coding_modules_tests_resources
- outputs = [
- "{{bundle_resources_dir}}/{{source_file_part}}",
- ]
+ outputs = [ "{{bundle_resources_dir}}/{{source_file_part}}" ]
}
}
}
diff --git a/modules/video_coding/rtp_frame_reference_finder.cc b/modules/video_coding/rtp_frame_reference_finder.cc
index e09c95f..1f4bcc7 100644
--- a/modules/video_coding/rtp_frame_reference_finder.cc
+++ b/modules/video_coding/rtp_frame_reference_finder.cc
@@ -13,12 +13,12 @@
#include <algorithm>
#include <limits>
+#include "absl/base/macros.h"
#include "absl/types/variant.h"
#include "modules/video_coding/frame_object.h"
#include "modules/video_coding/packet_buffer.h"
#include "rtc_base/checks.h"
#include "rtc_base/logging.h"
-#include "rtc_base/system/fallthrough.h"
namespace webrtc {
namespace video_coding {
@@ -78,7 +78,7 @@
case kHandOff:
complete_frame = true;
HandOffFrame(std::move(*frame_it));
- RTC_FALLTHROUGH();
+ ABSL_FALLTHROUGH_INTENDED;
case kDrop:
frame_it = stashed_frames_.erase(frame_it);
}
diff --git a/pc/BUILD.gn b/pc/BUILD.gn
index 7f24eb6..8f6ef59 100644
--- a/pc/BUILD.gn
+++ b/pc/BUILD.gn
@@ -13,9 +13,7 @@
}
group("pc") {
- deps = [
- ":rtc_pc",
- ]
+ deps = [ ":rtc_pc" ]
}
config("rtc_pc_config") {
@@ -267,7 +265,6 @@
"../rtc_base:safe_minmax",
"../rtc_base:weak_ptr",
"../rtc_base/experiments:field_trial_parser",
- "../rtc_base/system:fallthrough",
"../rtc_base/system:file_wrapper",
"../rtc_base/system:rtc_export",
"../rtc_base/third_party/base64",
@@ -375,9 +372,7 @@
rtc_library("peerconnection_perf_tests") {
testonly = true
- sources = [
- "peer_connection_rampup_tests.cc",
- ]
+ sources = [ "peer_connection_rampup_tests.cc" ]
deps = [
":pc_test_utils",
":peerconnection_wrapper",
diff --git a/pc/peer_connection.cc b/pc/peer_connection.cc
index 664a830..a43b49a 100644
--- a/pc/peer_connection.cc
+++ b/pc/peer_connection.cc
@@ -56,7 +56,6 @@
#include "rtc_base/logging.h"
#include "rtc_base/string_encode.h"
#include "rtc_base/strings/string_builder.h"
-#include "rtc_base/system/fallthrough.h"
#include "rtc_base/trace_event.h"
#include "system_wrappers/include/clock.h"
#include "system_wrappers/include/field_trial.h"
diff --git a/rtc_base/system/BUILD.gn b/rtc_base/system/BUILD.gn
index 8b78e34..937fec1 100644
--- a/rtc_base/system/BUILD.gn
+++ b/rtc_base/system/BUILD.gn
@@ -13,21 +13,11 @@
}
rtc_source_set("arch") {
- sources = [
- "arch.h",
- ]
+ sources = [ "arch.h" ]
}
rtc_source_set("asm_defines") {
- sources = [
- "asm_defines.h",
- ]
-}
-
-rtc_source_set("fallthrough") {
- sources = [
- "fallthrough.h",
- ]
+ sources = [ "asm_defines.h" ]
}
rtc_library("file_wrapper") {
@@ -43,21 +33,15 @@
}
rtc_source_set("ignore_warnings") {
- sources = [
- "ignore_warnings.h",
- ]
+ sources = [ "ignore_warnings.h" ]
}
rtc_source_set("inline") {
- sources = [
- "inline.h",
- ]
+ sources = [ "inline.h" ]
}
rtc_source_set("unused") {
- sources = [
- "unused.h",
- ]
+ sources = [ "unused.h" ]
}
rtc_source_set("rtc_export") {
@@ -73,20 +57,14 @@
"cocoa_threading.h",
"cocoa_threading.mm",
]
- deps = [
- "..:checks",
- ]
+ deps = [ "..:checks" ]
libs = [ "Foundation.framework" ]
}
}
rtc_source_set("thread_registry") {
- sources = [
- "thread_registry.h",
- ]
- deps = [
- "..:rtc_base_approved",
- ]
+ sources = [ "thread_registry.h" ]
+ deps = [ "..:rtc_base_approved" ]
if (is_android && !build_with_chromium) {
sources += [ "thread_registry.cc" ]
deps += [
@@ -97,9 +75,7 @@
}
rtc_source_set("warn_current_thread_is_deadlocked") {
- sources = [
- "warn_current_thread_is_deadlocked.h",
- ]
+ sources = [ "warn_current_thread_is_deadlocked.h" ]
deps = []
if (is_android && !build_with_chromium) {
sources += [ "warn_current_thread_is_deadlocked.cc" ]
diff --git a/rtc_base/system/fallthrough.h b/rtc_base/system/fallthrough.h
deleted file mode 100644
index 2bf0fea..0000000
--- a/rtc_base/system/fallthrough.h
+++ /dev/null
@@ -1,31 +0,0 @@
-/*
- * Copyright (c) 2018 The WebRTC project authors. All Rights Reserved.
- *
- * Use of this source code is governed by a BSD-style license
- * that can be found in the LICENSE file in the root of the source
- * tree. An additional intellectual property rights grant can be found
- * in the file PATENTS. All contributing project authors may
- * be found in the AUTHORS file in the root of the source tree.
- */
-
-#ifndef RTC_BASE_SYSTEM_FALLTHROUGH_H_
-#define RTC_BASE_SYSTEM_FALLTHROUGH_H_
-
-// Macro to be used for switch-case fallthrough (required for enabling
-// -Wimplicit-fallthrough warning on Clang).
-
-// This macro definition must not be included from public headers! Because
-// clang's diagnostic checks if there's a macro expanding to
-// [[clang::fallthrough]] defined, and if so it suggests the first macro
-// expanding to it. So if this macro is included in a public header, clang may
-// suggest it instead of the client's own macro, which can cause confusion.
-
-#ifdef __clang__
-#define RTC_FALLTHROUGH() [[clang::fallthrough]]
-#else
-#define RTC_FALLTHROUGH() \
- do { \
- } while (0)
-#endif
-
-#endif // RTC_BASE_SYSTEM_FALLTHROUGH_H_
diff --git a/sdk/BUILD.gn b/sdk/BUILD.gn
index e77ad32..24d6527 100644
--- a/sdk/BUILD.gn
+++ b/sdk/BUILD.gn
@@ -41,9 +41,7 @@
rtc_library("sdk_tests") {
testonly = true
- sources = [
- "media_constraints_unittest.cc",
- ]
+ sources = [ "media_constraints_unittest.cc" ]
deps = [
":media_constraints",
"../test:test_support",
@@ -84,9 +82,7 @@
rtc_library("common_objc") {
visibility = [ "*" ]
- sources = [
- "objc/helpers/noop.mm",
- ]
+ sources = [ "objc/helpers/noop.mm" ]
public_configs = [ ":common_config_objc" ]
@@ -243,13 +239,9 @@
rtc_source_set("audio_session_observer") {
visibility = [ ":*" ]
- sources = [
- "objc/native/src/audio/audio_session_observer.h",
- ]
+ sources = [ "objc/native/src/audio/audio_session_observer.h" ]
- deps = [
- "../rtc_base",
- ]
+ deps = [ "../rtc_base" ]
}
rtc_library("audio_device") {
@@ -278,9 +270,9 @@
"../modules/audio_device:audio_device_generic",
"../rtc_base",
"../rtc_base:checks",
- "../rtc_base/system:fallthrough",
"../system_wrappers:field_trial",
"../system_wrappers:metrics",
+ "//third_party/abseil-cpp/absl/base:core_headers",
]
libs = [ "AudioToolbox.framework" ]
@@ -542,9 +534,7 @@
# TODO(bugs.webrtc.org/9627): Remove this target.
rtc_library("videocapturebase_objc") {
visibility = [ "*" ]
- sources = [
- "objc/helpers/noop.mm",
- ]
+ sources = [ "objc/helpers/noop.mm" ]
configs += [ "..:common_objc" ]
@@ -700,9 +690,7 @@
]
defines = [ "HAVE_NO_MEDIA" ]
- sources = [
- "objc/helpers/noop.mm",
- ]
+ sources = [ "objc/helpers/noop.mm" ]
public_configs = [ ":common_config_objc" ]
@@ -734,16 +722,12 @@
# TODO(bugs.webrtc.org/9627): Remove, targets should depend on base_objc.
rtc_library("videorenderer_objc") {
visibility = [ "*" ]
- sources = [
- "objc/helpers/noop.mm",
- ]
+ sources = [ "objc/helpers/noop.mm" ]
configs += [ "..:common_objc" ]
public_configs = [ ":common_config_objc" ]
- deps = [
- ":base_objc",
- ]
+ deps = [ ":base_objc" ]
}
rtc_library("videorendereradapter_objc") {
@@ -1152,17 +1136,13 @@
# Sample video taken from https://media.xiph.org/video/derf/
"objc/unittests/foreman.mp4",
]
- outputs = [
- "{{bundle_resources_dir}}/{{source_file_part}}",
- ]
+ outputs = [ "{{bundle_resources_dir}}/{{source_file_part}}" ]
}
# These tests use static linking.
rtc_ios_xctest_test("sdk_unittests") {
info_plist = "//test/ios/Info.plist"
- sources = [
- "objc/unittests/main.mm",
- ]
+ sources = [ "objc/unittests/main.mm" ]
extra_substitutions = [ "GTEST_BUNDLE_ID_SUFFIX=generic-unit-test" ]
deps = [
@@ -1405,15 +1385,9 @@
}
bundle_data("ios_framework_bundle") {
- deps = [
- "../sdk:framework_objc",
- ]
- sources = [
- "$root_build_dir/WebRTC.framework",
- ]
- outputs = [
- "{{bundle_resources_dir}}/Frameworks/{{source_file_part}}",
- ]
+ deps = [ "../sdk:framework_objc" ]
+ sources = [ "$root_build_dir/WebRTC.framework" ]
+ outputs = [ "{{bundle_resources_dir}}/Frameworks/{{source_file_part}}" ]
}
}
@@ -1542,15 +1516,9 @@
}
bundle_data("mac_framework_bundle") {
- deps = [
- "../sdk:mac_framework_objc",
- ]
- sources = [
- "$root_build_dir/WebRTC.framework",
- ]
- outputs = [
- "{{bundle_contents_dir}}/Frameworks/{{source_file_part}}",
- ]
+ deps = [ "../sdk:mac_framework_objc" ]
+ sources = [ "$root_build_dir/WebRTC.framework" ]
+ outputs = [ "{{bundle_contents_dir}}/Frameworks/{{source_file_part}}" ]
}
}
diff --git a/sdk/objc/native/src/audio/voice_processing_audio_unit.mm b/sdk/objc/native/src/audio/voice_processing_audio_unit.mm
index 15a09b3..a2aa7f3 100644
--- a/sdk/objc/native/src/audio/voice_processing_audio_unit.mm
+++ b/sdk/objc/native/src/audio/voice_processing_audio_unit.mm
@@ -10,8 +10,8 @@
#import "voice_processing_audio_unit.h"
+#include "absl/base/macros.h"
#include "rtc_base/checks.h"
-#include "rtc_base/system/fallthrough.h"
#include "system_wrappers/include/metrics.h"
#import "base/RTCLogging.h"
@@ -446,12 +446,12 @@
case kStarted:
Stop();
// Fall through.
- RTC_FALLTHROUGH();
+ ABSL_FALLTHROUGH_INTENDED;
case kInitialized:
Uninitialize();
break;
case kUninitialized:
- RTC_FALLTHROUGH();
+ ABSL_FALLTHROUGH_INTENDED;
case kInitRequired:
break;
}
diff --git a/video/BUILD.gn b/video/BUILD.gn
index a048a2b..8ed37d3 100644
--- a/video/BUILD.gn
+++ b/video/BUILD.gn
@@ -110,7 +110,6 @@
"../rtc_base/experiments:quality_scaling_experiment",
"../rtc_base/experiments:rate_control_settings",
"../rtc_base/synchronization:sequence_checker",
- "../rtc_base/system:fallthrough",
"../rtc_base/system:thread_registry",
"../rtc_base/task_utils:repeating_task",
"../rtc_base/task_utils:to_queued_task",
@@ -119,6 +118,7 @@
"../system_wrappers:field_trial",
"../system_wrappers:metrics",
"//third_party/abseil-cpp/absl/algorithm:container",
+ "//third_party/abseil-cpp/absl/base:core_headers",
"//third_party/abseil-cpp/absl/memory",
"//third_party/abseil-cpp/absl/types:optional",
]
@@ -230,11 +230,11 @@
"../rtc_base/experiments:quality_scaling_experiment",
"../rtc_base/experiments:rate_control_settings",
"../rtc_base/synchronization:sequence_checker",
- "../rtc_base/system:fallthrough",
"../rtc_base/task_utils:repeating_task",
"../system_wrappers",
"../system_wrappers:field_trial",
"//third_party/abseil-cpp/absl/algorithm:container",
+ "//third_party/abseil-cpp/absl/base:core_headers",
"//third_party/abseil-cpp/absl/types:optional",
]
}
@@ -242,9 +242,7 @@
if (rtc_include_tests) {
rtc_library("video_mocks") {
testonly = true
- sources = [
- "test/mock_video_stream_encoder.h",
- ]
+ sources = [ "test/mock_video_stream_encoder.h" ]
deps = [
"../api/video:video_stream_encoder",
"../test:test_support",
@@ -330,9 +328,7 @@
rtc_library("video_full_stack_tests") {
testonly = true
- sources = [
- "full_stack_tests.cc",
- ]
+ sources = [ "full_stack_tests.cc" ]
deps = [
":video_quality_test",
"../api:simulated_network_api",
@@ -357,9 +353,7 @@
rtc_library("video_pc_full_stack_tests") {
testonly = true
- sources = [
- "pc_full_stack_tests.cc",
- ]
+ sources = [ "pc_full_stack_tests.cc" ]
deps = [
"../api:create_network_emulation_manager",
"../api:create_peerconnection_quality_test_fixture",
@@ -408,31 +402,21 @@
if (is_mac) {
mac_app_bundle("video_loopback") {
testonly = true
- sources = [
- "video_loopback_main.mm",
- ]
+ sources = [ "video_loopback_main.mm" ]
info_plist = "../test/mac/Info.plist"
- deps = [
- ":video_loopback_lib",
- ]
+ deps = [ ":video_loopback_lib" ]
}
} else {
rtc_executable("video_loopback") {
testonly = true
- sources = [
- "video_loopback_main.cc",
- ]
- deps = [
- ":video_loopback_lib",
- ]
+ sources = [ "video_loopback_main.cc" ]
+ deps = [ ":video_loopback_lib" ]
}
}
rtc_executable("screenshare_loopback") {
testonly = true
- sources = [
- "screenshare_loopback.cc",
- ]
+ sources = [ "screenshare_loopback.cc" ]
deps = [
":video_quality_test",
@@ -459,9 +443,7 @@
rtc_executable("sv_loopback") {
testonly = true
- sources = [
- "sv_loopback.cc",
- ]
+ sources = [ "sv_loopback.cc" ]
deps = [
":video_quality_test",
"../api:libjingle_peerconnection_api",
@@ -487,9 +469,7 @@
rtc_executable("video_replay") {
testonly = true
- sources = [
- "video_replay.cc",
- ]
+ sources = [ "video_replay.cc" ]
deps = [
"../api/rtc_event_log",
"../api/task_queue:default_task_queue_factory",
diff --git a/video/buffered_frame_decryptor.cc b/video/buffered_frame_decryptor.cc
index 41eddea..90d14d3 100644
--- a/video/buffered_frame_decryptor.cc
+++ b/video/buffered_frame_decryptor.cc
@@ -13,7 +13,6 @@
#include <utility>
#include "rtc_base/logging.h"
-#include "rtc_base/system/fallthrough.h"
#include "system_wrappers/include/field_trial.h"
namespace webrtc {
diff --git a/video/overuse_frame_detector_resource_adaptation_module.cc b/video/overuse_frame_detector_resource_adaptation_module.cc
index 2bd937b..c30f08f 100644
--- a/video/overuse_frame_detector_resource_adaptation_module.cc
+++ b/video/overuse_frame_detector_resource_adaptation_module.cc
@@ -17,13 +17,13 @@
#include <utility>
#include "absl/algorithm/container.h"
+#include "absl/base/macros.h"
#include "api/task_queue/task_queue_base.h"
#include "api/video/video_source_interface.h"
#include "call/adaptation/video_source_restrictions.h"
#include "rtc_base/logging.h"
#include "rtc_base/numerics/safe_conversions.h"
#include "rtc_base/strings/string_builder.h"
-#include "rtc_base/system/fallthrough.h"
#include "video/video_stream_encoder.h"
namespace webrtc {
@@ -562,7 +562,7 @@
return;
}
// Scale up resolution.
- RTC_FALLTHROUGH();
+ ABSL_FALLTHROUGH_INTENDED;
}
case DegradationPreference::MAINTAIN_FRAMERATE: {
// Check if resolution should be increased based on bitrate and
@@ -678,7 +678,7 @@
break;
}
// Scale down resolution.
- RTC_FALLTHROUGH();
+ ABSL_FALLTHROUGH_INTENDED;
}
case DegradationPreference::MAINTAIN_FRAMERATE: {
// Scale down resolution.
diff --git a/video/rtp_video_stream_receiver.cc b/video/rtp_video_stream_receiver.cc
index 495d2dc..9ae562b 100644
--- a/video/rtp_video_stream_receiver.cc
+++ b/video/rtp_video_stream_receiver.cc
@@ -16,6 +16,7 @@
#include <vector>
#include "absl/algorithm/container.h"
+#include "absl/base/macros.h"
#include "absl/memory/memory.h"
#include "absl/types/optional.h"
#include "media/base/media_constants.h"
@@ -43,7 +44,6 @@
#include "rtc_base/location.h"
#include "rtc_base/logging.h"
#include "rtc_base/strings/string_builder.h"
-#include "rtc_base/system/fallthrough.h"
#include "system_wrappers/include/field_trial.h"
#include "system_wrappers/include/metrics.h"
#include "video/receive_statistics_proxy.h"
@@ -467,7 +467,7 @@
case video_coding::H264SpsPpsTracker::kRequestKeyframe:
rtcp_feedback_buffer_.RequestKeyFrame();
rtcp_feedback_buffer_.SendBufferedRtcpFeedback();
- RTC_FALLTHROUGH();
+ ABSL_FALLTHROUGH_INTENDED;
case video_coding::H264SpsPpsTracker::kDrop:
return;
case video_coding::H264SpsPpsTracker::kInsert:
diff --git a/video/video_stream_encoder.cc b/video/video_stream_encoder.cc
index eecd7de..d8ac0fa 100644
--- a/video/video_stream_encoder.cc
+++ b/video/video_stream_encoder.cc
@@ -34,7 +34,6 @@
#include "rtc_base/location.h"
#include "rtc_base/logging.h"
#include "rtc_base/strings/string_builder.h"
-#include "rtc_base/system/fallthrough.h"
#include "rtc_base/time_utils.h"
#include "rtc_base/trace_event.h"
#include "system_wrappers/include/field_trial.h"