From: Michael Froman Date: Mon, 15 Sep 2025 11:52:00 -0500 Subject: Bug 1985396 - (fix-3dfa6f80d7) fixes for c++20 support Mercurial Revision: https://hg.mozilla.org/mozilla-central/rev/54b537ed2697ed8703366ac9a68a21be383f083e --- .../audio_coding/neteq/dtmf_tone_generator.cc | 20 +++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/modules/audio_coding/neteq/dtmf_tone_generator.cc b/modules/audio_coding/neteq/dtmf_tone_generator.cc index b22385df2a..01f6ead3d9 100644 --- a/modules/audio_coding/neteq/dtmf_tone_generator.cc +++ b/modules/audio_coding/neteq/dtmf_tone_generator.cc @@ -32,10 +32,10 @@ #include #include -#include #include "modules/audio_coding/neteq/audio_multi_vector.h" #include "modules/audio_coding/neteq/audio_vector.h" +#include "rtc_base/arraysize.h" #include "rtc_base/checks.h" namespace webrtc { @@ -137,26 +137,26 @@ int DtmfToneGenerator::Init(int fs, int event, int attenuation) { // Look up oscillator coefficient for low and high frequencies. RTC_DCHECK_LE(0, fs_index); - RTC_DCHECK_GT(std::size(kCoeff1), fs_index); - RTC_DCHECK_GT(std::size(kCoeff2), fs_index); + RTC_DCHECK_GT(arraysize(kCoeff1), fs_index); + RTC_DCHECK_GT(arraysize(kCoeff2), fs_index); RTC_DCHECK_LE(0, event); - RTC_DCHECK_GT(std::ssize(kCoeff1[fs_index]), event); - RTC_DCHECK_GT(std::ssize(kCoeff2[fs_index]), event); + RTC_DCHECK_GT(arraysize(kCoeff1[fs_index]), event); + RTC_DCHECK_GT(arraysize(kCoeff2[fs_index]), event); coeff1_ = kCoeff1[fs_index][event]; coeff2_ = kCoeff2[fs_index][event]; // Look up amplitude multiplier. RTC_DCHECK_LE(0, attenuation); - RTC_DCHECK_GT(std::ssize(kAmplitude), attenuation); + RTC_DCHECK_GT(arraysize(kAmplitude), attenuation); amplitude_ = kAmplitude[attenuation]; // Initialize sample history. RTC_DCHECK_LE(0, fs_index); - RTC_DCHECK_GT(std::size(kInitValue1), fs_index); - RTC_DCHECK_GT(std::size(kInitValue2), fs_index); + RTC_DCHECK_GT(arraysize(kInitValue1), fs_index); + RTC_DCHECK_GT(arraysize(kInitValue2), fs_index); RTC_DCHECK_LE(0, event); - RTC_DCHECK_GT(std::ssize(kInitValue1[fs_index]), event); - RTC_DCHECK_GT(std::ssize(kInitValue2[fs_index]), event); + RTC_DCHECK_GT(arraysize(kInitValue1[fs_index]), event); + RTC_DCHECK_GT(arraysize(kInitValue2[fs_index]), event); sample_history1_[0] = kInitValue1[fs_index][event]; sample_history1_[1] = 0; sample_history2_[0] = kInitValue2[fs_index][event];