Prepare to rename RTC_NOTREACHED to RTC_DCHECK_NOTREACHED Add implementation of RTC_DCHECK_NOTREACHED equal to the RTC_NOTREACHED. The new macros will replace the old one when old one's usage will be removed. The idea of the renaming to provide a clear signal that this is debug build only macros and will be stripped in the production build. Bug: webrtc:9065 Change-Id: I4c35d8b03e74a4b3fd1ae75dba2f9c05643101db Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/237802 Reviewed-by: Harald Alvestrand <hta@webrtc.org> Commit-Queue: Artem Titov <titovartem@webrtc.org> Cr-Commit-Position: refs/heads/main@{#35348}
diff --git a/call/adaptation/video_stream_adapter.cc b/call/adaptation/video_stream_adapter.cc index ca62502..c6560b3 100644 --- a/call/adaptation/video_stream_adapter.cc +++ b/call/adaptation/video_stream_adapter.cc
@@ -509,7 +509,7 @@ max_frame_rate = balanced_settings_.MinFps(input_state.video_codec_type(), frame_size_pixels); } else { - RTC_NOTREACHED(); + RTC_DCHECK_NOTREACHED(); max_frame_rate = GetLowerFrameRateThan(input_state.frames_per_second()); } if (!CanDecreaseFrameRateTo(max_frame_rate, @@ -584,7 +584,7 @@ return Adaptation::Status::kLimitReached; } } else { - RTC_NOTREACHED(); + RTC_DCHECK_NOTREACHED(); max_frame_rate = GetHigherFrameRateThan(input_state.frames_per_second()); } if (current_restrictions.counters.fps_adaptations == 1) {
diff --git a/call/rtp_config.cc b/call/rtp_config.cc index c84a63e..5457a94 100644 --- a/call/rtp_config.cc +++ b/call/rtp_config.cc
@@ -29,7 +29,7 @@ if (ssrcs[i] == ssrc) return associated_ssrcs[i]; } - RTC_NOTREACHED(); + RTC_DCHECK_NOTREACHED(); return 0; }
diff --git a/call/rtp_payload_params.cc b/call/rtp_payload_params.cc index 53a4cca..5eff91f 100644 --- a/call/rtp_payload_params.cc +++ b/call/rtp_payload_params.cc
@@ -295,7 +295,7 @@ case VideoCodecType::kVideoCodecMultiplex: return; } - RTC_NOTREACHED() << "Unsupported codec."; + RTC_DCHECK_NOTREACHED() << "Unsupported codec."; } void RtpPayloadParams::GenericToGeneric(int64_t shared_frame_id,