diff --git a/webrtc/audio/audio_transport_proxy.cc b/webrtc/audio/audio_transport_proxy.cc index 163cc11c77..7036c1059c 100644 --- a/webrtc/audio/audio_transport_proxy.cc +++ b/webrtc/audio/audio_transport_proxy.cc @@ -68,8 +68,8 @@ int32_t AudioTransportProxy::NeedMorePlayData(const size_t nSamples, int64_t* elapsed_time_ms, int64_t* ntp_time_ms) { RTC_DCHECK_EQ(sizeof(int16_t) * nChannels, nBytesPerSample); - RTC_DCHECK_GE(nChannels, 1u); - RTC_DCHECK_LE(nChannels, 2u); + RTC_DCHECK_GE(nChannels, 1); + RTC_DCHECK_LE(nChannels, 2); RTC_DCHECK_GE( samplesPerSec, static_cast(AudioProcessing::NativeRate::kSampleRate8kHz)); @@ -111,8 +111,8 @@ void AudioTransportProxy::PullRenderData(int bits_per_sample, int64_t* elapsed_time_ms, int64_t* ntp_time_ms) { RTC_DCHECK_EQ(static_cast(bits_per_sample), 16); - RTC_DCHECK_GE(number_of_channels, 1u); - RTC_DCHECK_LE(number_of_channels, 2u); + RTC_DCHECK_GE(number_of_channels, 1); + RTC_DCHECK_LE(number_of_channels, 2); RTC_DCHECK_GE(static_cast(sample_rate), AudioProcessing::NativeRate::kSampleRate8kHz); diff --git a/webrtc/base/bitbuffer.cc b/webrtc/base/bitbuffer.cc index 48a1d0ccdb..fc8a899ad6 100644 --- a/webrtc/base/bitbuffer.cc +++ b/webrtc/base/bitbuffer.cc @@ -19,14 +19,14 @@ namespace { // Returns the lowest (right-most) |bit_count| bits in |byte|. uint8_t LowestBits(uint8_t byte, size_t bit_count) { - RTC_DCHECK_LE(bit_count, 8u); + RTC_DCHECK_LE(bit_count, 8); return byte & ((1 << bit_count) - 1); } // Returns the highest (left-most) |bit_count| bits in |byte|, shifted to the // lowest bits (to the right). uint8_t HighestBits(uint8_t byte, size_t bit_count) { - RTC_DCHECK_LE(bit_count, 8u); + RTC_DCHECK_LE(bit_count, 8); uint8_t shift = 8 - static_cast(bit_count); uint8_t mask = 0xFF << shift; return (byte & mask) >> shift; diff --git a/webrtc/base/filerotatingstream.cc b/webrtc/base/filerotatingstream.cc index 080999476b..d1434de9dd 100644 --- a/webrtc/base/filerotatingstream.cc +++ b/webrtc/base/filerotatingstream.cc @@ -37,8 +37,8 @@ FileRotatingStream::FileRotatingStream(const std::string& dir_path, max_file_size, num_files, kWrite) { - RTC_DCHECK_GT(max_file_size, 0u); - RTC_DCHECK_GT(num_files, 1u); + RTC_DCHECK_GT(max_file_size, 0); + RTC_DCHECK_GT(num_files, 1); } FileRotatingStream::FileRotatingStream(const std::string& dir_path, @@ -248,7 +248,7 @@ bool FileRotatingStream::OpenCurrentFile() { case kWrite: mode = "w+"; // We should always we writing to the zero-th file. - RTC_DCHECK_EQ(current_file_index_, 0u); + RTC_DCHECK_EQ(current_file_index_, 0); break; case kRead: mode = "r"; @@ -360,7 +360,7 @@ CallSessionFileRotatingStream::CallSessionFileRotatingStream( GetNumRotatingLogFiles(max_total_log_size) + 1), max_total_log_size_(max_total_log_size), num_rotations_(0) { - RTC_DCHECK_GE(max_total_log_size, 4u); + RTC_DCHECK_GE(max_total_log_size, 4); } const char* CallSessionFileRotatingStream::kLogPrefix = "webrtc_log"; diff --git a/webrtc/base/flags.cc b/webrtc/base/flags.cc index a138b8fb9b..4fcd4acc11 100644 --- a/webrtc/base/flags.cc +++ b/webrtc/base/flags.cc @@ -258,7 +258,7 @@ int FlagList::SetFlagsFromCommandLine(int* argc, const char** argv, void FlagList::Register(Flag* flag) { RTC_DCHECK(flag); - RTC_DCHECK_GT(strlen(flag->name()), 0u); + RTC_DCHECK_GT(strlen(flag->name()), 0); // NOTE: Don't call Lookup() within Register because it accesses the name_ // of other flags in list_, and if the flags are coming from two different // compilation units, the initialization order between them is undefined, and diff --git a/webrtc/call/bitrate_allocator.cc b/webrtc/call/bitrate_allocator.cc index 2c5ba6d76c..6e9be731d5 100644 --- a/webrtc/call/bitrate_allocator.cc +++ b/webrtc/call/bitrate_allocator.cc @@ -36,7 +36,7 @@ const int64_t kBweLogIntervalMs = 5000; namespace { double MediaRatio(uint32_t allocated_bitrate, uint32_t protection_bitrate) { - RTC_DCHECK_GT(allocated_bitrate, 0u); + RTC_DCHECK_GT(allocated_bitrate, 0); if (protection_bitrate == 0) return 1.0; @@ -382,7 +382,7 @@ void BitrateAllocator::DistributeBitrateEvenly(uint32_t bitrate, } auto it = list_max_bitrates.begin(); while (it != list_max_bitrates.end()) { - RTC_DCHECK_GT(bitrate, 0u); + RTC_DCHECK_GT(bitrate, 0); uint32_t extra_allocation = bitrate / static_cast(list_max_bitrates.size()); uint32_t total_allocation = diff --git a/webrtc/call/bitrate_estimator_tests.cc b/webrtc/call/bitrate_estimator_tests.cc index ddb69ed6fc..95d42ef117 100644 --- a/webrtc/call/bitrate_estimator_tests.cc +++ b/webrtc/call/bitrate_estimator_tests.cc @@ -166,7 +166,7 @@ class BitrateEstimatorTest : public test::CallTest { send_stream_ = test_->sender_call_->CreateVideoSendStream( test_->video_send_config_.Copy(), test_->video_encoder_config_.Copy()); - RTC_DCHECK_EQ(1u, test_->video_encoder_config_.number_of_streams); + RTC_DCHECK_EQ(1, test_->video_encoder_config_.number_of_streams); frame_generator_capturer_.reset(test::FrameGeneratorCapturer::Create( kDefaultWidth, kDefaultHeight, kDefaultFramerate, Clock::GetRealTimeClock())); diff --git a/webrtc/call/call_perf_tests.cc b/webrtc/call/call_perf_tests.cc index 354e092a4f..fb5ae0d45e 100644 --- a/webrtc/call/call_perf_tests.cc +++ b/webrtc/call/call_perf_tests.cc @@ -549,7 +549,7 @@ void CallPerfTest::TestMinTransmitBitrate(bool pad_to_min_bitrate) { Action OnSendRtp(const uint8_t* packet, size_t length) override { VideoSendStream::Stats stats = send_stream_->GetStats(); if (stats.substreams.size() > 0) { - RTC_DCHECK_EQ(1u, stats.substreams.size()); + RTC_DCHECK_EQ(1, stats.substreams.size()); int bitrate_kbps = stats.substreams.begin()->second.total_bitrate_bps / 1000; if (bitrate_kbps > min_acceptable_bitrate_ && diff --git a/webrtc/common_audio/audio_converter.cc b/webrtc/common_audio/audio_converter.cc index d1dcacd96d..231ba88077 100644 --- a/webrtc/common_audio/audio_converter.cc +++ b/webrtc/common_audio/audio_converter.cc @@ -109,7 +109,7 @@ class CompositionConverter : public AudioConverter { public: CompositionConverter(std::vector> converters) : converters_(std::move(converters)) { - RTC_CHECK_GE(converters_.size(), 2u); + RTC_CHECK_GE(converters_.size(), 2); // We need an intermediate buffer after every converter. for (auto it = converters_.begin(); it != converters_.end() - 1; ++it) buffers_.push_back( diff --git a/webrtc/common_audio/channel_buffer.h b/webrtc/common_audio/channel_buffer.h index f4ed683484..c4c85d1ef5 100644 --- a/webrtc/common_audio/channel_buffer.h +++ b/webrtc/common_audio/channel_buffer.h @@ -94,7 +94,7 @@ class ChannelBuffer { // 0 <= sample < |num_frames_per_band_| const T* const* bands(size_t channel) const { RTC_DCHECK_LT(channel, num_channels_); - RTC_DCHECK_GE(channel, 0u); + RTC_DCHECK_GE(channel, 0); return &bands_[channel * num_bands_]; } T* const* bands(size_t channel) { diff --git a/webrtc/common_audio/include/audio_util.h b/webrtc/common_audio/include/audio_util.h index e5ad701595..1601c7fd1e 100644 --- a/webrtc/common_audio/include/audio_util.h +++ b/webrtc/common_audio/include/audio_util.h @@ -154,7 +154,7 @@ void DownmixInterleavedToMonoImpl(const T* interleaved, int num_channels, T* deinterleaved) { RTC_DCHECK_GT(num_channels, 0); - RTC_DCHECK_GT(num_frames, 0u); + RTC_DCHECK_GT(num_frames, 0); const T* const end = interleaved + num_frames * num_channels; diff --git a/webrtc/common_audio/lapped_transform.cc b/webrtc/common_audio/lapped_transform.cc index 8a791f3291..6825bebb7a 100644 --- a/webrtc/common_audio/lapped_transform.cc +++ b/webrtc/common_audio/lapped_transform.cc @@ -84,12 +84,12 @@ LappedTransform::LappedTransform(size_t num_in_channels, cplx_length_, RealFourier::kFftBufferAlignment) { RTC_CHECK(num_in_channels_ > 0); - RTC_CHECK_GT(block_length_, 0u); - RTC_CHECK_GT(chunk_length_, 0u); + RTC_CHECK_GT(block_length_, 0); + RTC_CHECK_GT(chunk_length_, 0); RTC_CHECK(block_processor_); // block_length_ power of 2? - RTC_CHECK_EQ(0u, block_length_ & (block_length_ - 1)); + RTC_CHECK_EQ(0, block_length_ & (block_length_ - 1)); } LappedTransform::~LappedTransform() = default; diff --git a/webrtc/common_audio/resampler/push_resampler.cc b/webrtc/common_audio/resampler/push_resampler.cc index 9f329c4cb9..788223d343 100644 --- a/webrtc/common_audio/resampler/push_resampler.cc +++ b/webrtc/common_audio/resampler/push_resampler.cc @@ -32,8 +32,8 @@ void CheckValidInitParams(int src_sample_rate_hz, int dst_sample_rate_hz, #if !defined(WEBRTC_WIN) && defined(__clang__) RTC_DCHECK_GT(src_sample_rate_hz, 0); RTC_DCHECK_GT(dst_sample_rate_hz, 0); - RTC_DCHECK_GT(num_channels, 0u); - RTC_DCHECK_LE(num_channels, 2u); + RTC_DCHECK_GT(num_channels, 0); + RTC_DCHECK_LE(num_channels, 2); #endif } diff --git a/webrtc/common_audio/sparse_fir_filter.cc b/webrtc/common_audio/sparse_fir_filter.cc index a79da07b2d..2928004a0d 100644 --- a/webrtc/common_audio/sparse_fir_filter.cc +++ b/webrtc/common_audio/sparse_fir_filter.cc @@ -22,8 +22,8 @@ SparseFIRFilter::SparseFIRFilter(const float* nonzero_coeffs, offset_(offset), nonzero_coeffs_(nonzero_coeffs, nonzero_coeffs + num_nonzero_coeffs), state_(sparsity_ * (num_nonzero_coeffs - 1) + offset_, 0.f) { - RTC_CHECK_GE(num_nonzero_coeffs, 1u); - RTC_CHECK_GE(sparsity, 1u); + RTC_CHECK_GE(num_nonzero_coeffs, 1); + RTC_CHECK_GE(sparsity, 1); } SparseFIRFilter::~SparseFIRFilter() = default; diff --git a/webrtc/common_audio/wav_file.cc b/webrtc/common_audio/wav_file.cc index 572c94ba3d..2b9098a6cd 100644 --- a/webrtc/common_audio/wav_file.cc +++ b/webrtc/common_audio/wav_file.cc @@ -123,7 +123,7 @@ WavWriter::WavWriter(const std::string& filename, int sample_rate, // Write a blank placeholder header, since we need to know the total number // of samples before we can fill in the real data. static const uint8_t blank_header[kWavHeaderSize] = {0}; - RTC_CHECK_EQ(1u, fwrite(blank_header, kWavHeaderSize, 1, file_handle_)); + RTC_CHECK_EQ(1, fwrite(blank_header, kWavHeaderSize, 1, file_handle_)); } WavWriter::~WavWriter() { @@ -168,7 +168,7 @@ void WavWriter::Close() { uint8_t header[kWavHeaderSize]; WriteWavHeader(header, num_channels_, sample_rate_, kWavFormat, kBytesPerSample, num_samples_); - RTC_CHECK_EQ(1u, fwrite(header, kWavHeaderSize, 1, file_handle_)); + RTC_CHECK_EQ(1, fwrite(header, kWavHeaderSize, 1, file_handle_)); RTC_CHECK_EQ(0, fclose(file_handle_)); file_handle_ = NULL; } diff --git a/webrtc/media/engine/webrtcvideoengine2.cc b/webrtc/media/engine/webrtcvideoengine2.cc index e947fd1254..3f9d5f6596 100644 --- a/webrtc/media/engine/webrtcvideoengine2.cc +++ b/webrtc/media/engine/webrtcvideoengine2.cc @@ -1780,7 +1780,7 @@ void WebRtcVideoChannel2::WebRtcVideoSendStream::SetCodec( const VideoCodecSettings& codec_settings) { RTC_DCHECK_RUN_ON(&thread_checker_); parameters_.encoder_config = CreateVideoEncoderConfig(codec_settings.codec); - RTC_DCHECK_GT(parameters_.encoder_config.number_of_streams, 0u); + RTC_DCHECK_GT(parameters_.encoder_config.number_of_streams, 0); AllocatedEncoder new_encoder = CreateVideoEncoder(codec_settings.codec); parameters_.config.encoder_settings.encoder = new_encoder.encoder; @@ -1961,7 +1961,7 @@ void WebRtcVideoChannel2::WebRtcVideoSendStream::ReconfigureEncoder() { return; } - RTC_DCHECK_GT(parameters_.encoder_config.number_of_streams, 0u); + RTC_DCHECK_GT(parameters_.encoder_config.number_of_streams, 0); RTC_CHECK(parameters_.codec_settings); VideoCodecSettings codec_settings = *parameters_.codec_settings; diff --git a/webrtc/modules/audio_coding/acm2/audio_coding_module.cc b/webrtc/modules/audio_coding/acm2/audio_coding_module.cc index ee1034b75a..dd02964e90 100644 --- a/webrtc/modules/audio_coding/acm2/audio_coding_module.cc +++ b/webrtc/modules/audio_coding/acm2/audio_coding_module.cc @@ -536,7 +536,7 @@ int32_t AudioCodingModuleImpl::Encode(const InputData& input_data) { frame_type = kEmptyFrame; encoded_info.payload_type = previous_pltype; } else { - RTC_DCHECK_GT(encode_buffer_.size(), 0u); + RTC_DCHECK_GT(encode_buffer_.size(), 0); frame_type = encoded_info.speech ? kAudioFrameSpeech : kAudioFrameCN; } diff --git a/webrtc/modules/audio_coding/acm2/codec_manager.cc b/webrtc/modules/audio_coding/acm2/codec_manager.cc index d8dcd792c4..afeefc78c2 100644 --- a/webrtc/modules/audio_coding/acm2/codec_manager.cc +++ b/webrtc/modules/audio_coding/acm2/codec_manager.cc @@ -211,7 +211,7 @@ bool CodecManager::MakeEncoder(RentACodec* rac, AudioCodingModule* acm) { if (sub_enc.empty()) { break; } - RTC_CHECK_EQ(1u, sub_enc.size()); + RTC_CHECK_EQ(1, sub_enc.size()); // Replace enc with its sub encoder. We need to put the sub encoder in // a temporary first, since otherwise the old value of enc would be diff --git a/webrtc/modules/audio_coding/codecs/cng/audio_encoder_cng.cc b/webrtc/modules/audio_coding/codecs/cng/audio_encoder_cng.cc index d2edcb5c26..b1629410fc 100644 --- a/webrtc/modules/audio_coding/codecs/cng/audio_encoder_cng.cc +++ b/webrtc/modules/audio_coding/codecs/cng/audio_encoder_cng.cc @@ -240,9 +240,9 @@ AudioEncoder::EncodedInfo AudioEncoderCng::EncodeActive( samples_per_10ms_frame), encoded); if (i + 1 == frames_to_encode) { - RTC_CHECK_GT(info.encoded_bytes, 0u) << "Encoder didn't deliver data."; + RTC_CHECK_GT(info.encoded_bytes, 0) << "Encoder didn't deliver data."; } else { - RTC_CHECK_EQ(info.encoded_bytes, 0u) + RTC_CHECK_EQ(info.encoded_bytes, 0) << "Encoder delivered data too early."; } } diff --git a/webrtc/modules/audio_coding/codecs/g711/audio_decoder_pcm.h b/webrtc/modules/audio_coding/codecs/g711/audio_decoder_pcm.h index 483311b61b..b1d259e965 100644 --- a/webrtc/modules/audio_coding/codecs/g711/audio_decoder_pcm.h +++ b/webrtc/modules/audio_coding/codecs/g711/audio_decoder_pcm.h @@ -20,7 +20,7 @@ namespace webrtc { class AudioDecoderPcmU final : public AudioDecoder { public: explicit AudioDecoderPcmU(size_t num_channels) : num_channels_(num_channels) { - RTC_DCHECK_GE(num_channels, 1u); + RTC_DCHECK_GE(num_channels, 1); } void Reset() override; std::vector ParsePayload(rtc::Buffer&& payload, @@ -44,7 +44,7 @@ class AudioDecoderPcmU final : public AudioDecoder { class AudioDecoderPcmA final : public AudioDecoder { public: explicit AudioDecoderPcmA(size_t num_channels) : num_channels_(num_channels) { - RTC_DCHECK_GE(num_channels, 1u); + RTC_DCHECK_GE(num_channels, 1); } void Reset() override; std::vector ParsePayload(rtc::Buffer&& payload, diff --git a/webrtc/modules/audio_coding/codecs/ilbc/audio_decoder_ilbc.cc b/webrtc/modules/audio_coding/codecs/ilbc/audio_decoder_ilbc.cc index 354f8194d8..a0fc02bb59 100644 --- a/webrtc/modules/audio_coding/codecs/ilbc/audio_decoder_ilbc.cc +++ b/webrtc/modules/audio_coding/codecs/ilbc/audio_decoder_ilbc.cc @@ -76,7 +76,7 @@ std::vector AudioDecoderIlbc::ParsePayload( return results; } - RTC_DCHECK_EQ(0u, payload.size() % bytes_per_frame); + RTC_DCHECK_EQ(0, payload.size() % bytes_per_frame); if (payload.size() == bytes_per_frame) { std::unique_ptr frame( new LegacyEncodedAudioFrame(this, std::move(payload))); diff --git a/webrtc/modules/audio_coding/codecs/opus/audio_encoder_opus.cc b/webrtc/modules/audio_coding/codecs/opus/audio_encoder_opus.cc index e9772f674b..1dc312f5e9 100644 --- a/webrtc/modules/audio_coding/codecs/opus/audio_encoder_opus.cc +++ b/webrtc/modules/audio_coding/codecs/opus/audio_encoder_opus.cc @@ -452,7 +452,7 @@ void AudioEncoderOpus::SetFrameLength(int frame_length_ms) { } void AudioEncoderOpus::SetNumChannelsToEncode(size_t num_channels_to_encode) { - RTC_DCHECK_GT(num_channels_to_encode, 0u); + RTC_DCHECK_GT(num_channels_to_encode, 0); RTC_DCHECK_LE(num_channels_to_encode, config_.num_channels); if (num_channels_to_encode_ == num_channels_to_encode) diff --git a/webrtc/modules/audio_coding/codecs/opus/audio_encoder_opus_unittest.cc b/webrtc/modules/audio_coding/codecs/opus/audio_encoder_opus_unittest.cc index 54529ad985..8e59f496d8 100644 --- a/webrtc/modules/audio_coding/codecs/opus/audio_encoder_opus_unittest.cc +++ b/webrtc/modules/audio_coding/codecs/opus/audio_encoder_opus_unittest.cc @@ -180,7 +180,7 @@ namespace { // Returns a vector with the n evenly-spaced numbers a, a + (b - a)/(n - 1), // ..., b. std::vector IntervalSteps(double a, double b, size_t n) { - RTC_DCHECK_GT(n, 1u); + RTC_DCHECK_GT(n, 1); const double step = (b - a) / (n - 1); std::vector points; for (size_t i = 0; i < n; ++i) diff --git a/webrtc/modules/audio_coding/codecs/pcm16b/audio_decoder_pcm16b.cc b/webrtc/modules/audio_coding/codecs/pcm16b/audio_decoder_pcm16b.cc index 43d2dacf9b..692e212ed9 100644 --- a/webrtc/modules/audio_coding/codecs/pcm16b/audio_decoder_pcm16b.cc +++ b/webrtc/modules/audio_coding/codecs/pcm16b/audio_decoder_pcm16b.cc @@ -21,7 +21,7 @@ AudioDecoderPcm16B::AudioDecoderPcm16B(int sample_rate_hz, size_t num_channels) RTC_DCHECK(sample_rate_hz == 8000 || sample_rate_hz == 16000 || sample_rate_hz == 32000 || sample_rate_hz == 48000) << "Unsupported sample rate " << sample_rate_hz; - RTC_DCHECK_GE(num_channels, 1u); + RTC_DCHECK_GE(num_channels, 1); } void AudioDecoderPcm16B::Reset() {} diff --git a/webrtc/modules/audio_coding/codecs/red/audio_encoder_copy_red.cc b/webrtc/modules/audio_coding/codecs/red/audio_encoder_copy_red.cc index 37fa55a4da..07db78c911 100644 --- a/webrtc/modules/audio_coding/codecs/red/audio_encoder_copy_red.cc +++ b/webrtc/modules/audio_coding/codecs/red/audio_encoder_copy_red.cc @@ -71,11 +71,11 @@ AudioEncoder::EncodedInfo AudioEncoderCopyRed::EncodeImpl( // discarding the (empty) vector of redundant information. This is // intentional. info.redundant.push_back(info); - RTC_DCHECK_EQ(info.redundant.size(), 1u); + RTC_DCHECK_EQ(info.redundant.size(), 1); if (secondary_info_.encoded_bytes > 0) { encoded->AppendData(secondary_encoded_); info.redundant.push_back(secondary_info_); - RTC_DCHECK_EQ(info.redundant.size(), 2u); + RTC_DCHECK_EQ(info.redundant.size(), 2); } // Save primary to secondary. secondary_encoded_.SetData(encoded->data() + primary_offset, diff --git a/webrtc/modules/audio_coding/neteq/delay_peak_detector.cc b/webrtc/modules/audio_coding/neteq/delay_peak_detector.cc index 10535e23f5..5763572bad 100644 --- a/webrtc/modules/audio_coding/neteq/delay_peak_detector.cc +++ b/webrtc/modules/audio_coding/neteq/delay_peak_detector.cc @@ -66,7 +66,7 @@ uint64_t DelayPeakDetector::MaxPeakPeriod() const { if (max_period_element == peak_history_.end()) { return 0; // |peak_history_| is empty. } - RTC_DCHECK_GT(max_period_element->period_ms, 0u); + RTC_DCHECK_GT(max_period_element->period_ms, 0); return max_period_element->period_ms; } diff --git a/webrtc/modules/audio_coding/neteq/nack_tracker.cc b/webrtc/modules/audio_coding/neteq/nack_tracker.cc index 62cb2ec958..f97879319a 100644 --- a/webrtc/modules/audio_coding/neteq/nack_tracker.cc +++ b/webrtc/modules/audio_coding/neteq/nack_tracker.cc @@ -196,7 +196,7 @@ void NackTracker::Reset() { } void NackTracker::SetMaxNackListSize(size_t max_nack_list_size) { - RTC_CHECK_GT(max_nack_list_size, 0u); + RTC_CHECK_GT(max_nack_list_size, 0); // Ugly hack to get around the problem of passing static consts by reference. const size_t kNackListSizeLimitLocal = NackTracker::kNackListSizeLimit; RTC_CHECK_LE(max_nack_list_size, kNackListSizeLimitLocal); diff --git a/webrtc/modules/audio_coding/neteq/test/RTPencode.cc b/webrtc/modules/audio_coding/neteq/test/RTPencode.cc index 4ccf4fbdcb..f390f5330b 100644 --- a/webrtc/modules/audio_coding/neteq/test/RTPencode.cc +++ b/webrtc/modules/audio_coding/neteq/test/RTPencode.cc @@ -1724,7 +1724,7 @@ size_t NetEQTest_encode(webrtc::NetEqDecoder coder, #ifdef CODEC_OPUS cdlen = WebRtcOpus_Encode(opus_inst[k], indata, frameLen, kRtpDataSize - 12, encoded); - RTC_CHECK_GT(cdlen, 0u); + RTC_CHECK_GT(cdlen, 0); #endif indata += frameLen; encoded += cdlen; diff --git a/webrtc/modules/audio_coding/neteq/tools/encode_neteq_input.cc b/webrtc/modules/audio_coding/neteq/tools/encode_neteq_input.cc index c89200be87..263f7b4223 100644 --- a/webrtc/modules/audio_coding/neteq/tools/encode_neteq_input.cc +++ b/webrtc/modules/audio_coding/neteq/tools/encode_neteq_input.cc @@ -59,7 +59,7 @@ void EncodeNetEqInput::CreatePacket() { // Create a new PacketData object. RTC_DCHECK(!packet_data_); packet_data_.reset(new NetEqInput::PacketData); - RTC_DCHECK_EQ(packet_data_->payload.size(), 0u); + RTC_DCHECK_EQ(packet_data_->payload.size(), 0); // Loop until we get a packet. AudioEncoder::EncodedInfo info; diff --git a/webrtc/modules/audio_coding/neteq/tools/fake_decode_from_file.cc b/webrtc/modules/audio_coding/neteq/tools/fake_decode_from_file.cc index 29beed5644..2e452e1dea 100644 --- a/webrtc/modules/audio_coding/neteq/tools/fake_decode_from_file.cc +++ b/webrtc/modules/audio_coding/neteq/tools/fake_decode_from_file.cc @@ -26,13 +26,13 @@ int FakeDecodeFromFile::DecodeInternal(const uint8_t* encoded, // Decoder is asked to produce codec-internal comfort noise. RTC_DCHECK(!encoded); // NetEq always sends nullptr in this case. RTC_DCHECK(cng_mode_); - RTC_DCHECK_GT(last_decoded_length_, 0u); + RTC_DCHECK_GT(last_decoded_length_, 0); std::fill_n(decoded, last_decoded_length_, 0); *speech_type = kComfortNoise; return last_decoded_length_; } - RTC_CHECK_GE(encoded_len, 12u); + RTC_CHECK_GE(encoded_len, 12); uint32_t timestamp_to_decode = ByteReader::ReadLittleEndian(encoded); uint32_t samples_to_decode = @@ -66,7 +66,7 @@ int FakeDecodeFromFile::DecodeInternal(const uint8_t* encoded, ByteReader::ReadLittleEndian(&encoded[8]); if (original_payload_size_bytes == 1) { // This is a comfort noise payload. - RTC_DCHECK_GT(last_decoded_length_, 0u); + RTC_DCHECK_GT(last_decoded_length_, 0); std::fill_n(decoded, last_decoded_length_, 0); *speech_type = kComfortNoise; cng_mode_ = true; @@ -90,7 +90,7 @@ void FakeDecodeFromFile::PrepareEncoded(uint32_t timestamp, size_t samples, size_t original_payload_size_bytes, rtc::ArrayView encoded) { - RTC_CHECK_GE(encoded.size(), 12u); + RTC_CHECK_GE(encoded.size(), 12); ByteWriter::WriteLittleEndian(&encoded[0], timestamp); ByteWriter::WriteLittleEndian(&encoded[4], rtc::checked_cast(samples)); diff --git a/webrtc/modules/audio_coding/neteq/tools/neteq_replacement_input.cc b/webrtc/modules/audio_coding/neteq/tools/neteq_replacement_input.cc index c9163a15d8..dd10649625 100644 --- a/webrtc/modules/audio_coding/neteq/tools/neteq_replacement_input.cc +++ b/webrtc/modules/audio_coding/neteq/tools/neteq_replacement_input.cc @@ -70,7 +70,7 @@ void NetEqReplacementInput::ReplacePacket() { RTC_DCHECK(packet_); - RTC_CHECK_EQ(forbidden_types_.count(packet_->header.header.payloadType), 0u) + RTC_CHECK_EQ(forbidden_types_.count(packet_->header.header.payloadType), 0) << "Payload type " << static_cast(packet_->header.header.payloadType) << " is forbidden."; diff --git a/webrtc/modules/audio_device/android/opensles_player.cc b/webrtc/modules/audio_device/android/opensles_player.cc index d675d637e3..7dfc5ec891 100644 --- a/webrtc/modules/audio_device/android/opensles_player.cc +++ b/webrtc/modules/audio_device/android/opensles_player.cc @@ -145,8 +145,8 @@ int OpenSLESPlayer::StopPlayout() { // Verify that the buffer queue is in fact cleared as it should. SLAndroidSimpleBufferQueueState buffer_queue_state; (*simple_buffer_queue_)->GetState(simple_buffer_queue_, &buffer_queue_state); - RTC_DCHECK_EQ(0u, buffer_queue_state.count); - RTC_DCHECK_EQ(0u, buffer_queue_state.index); + RTC_DCHECK_EQ(0, buffer_queue_state.count); + RTC_DCHECK_EQ(0, buffer_queue_state.index); #endif // The number of lower latency audio players is limited, hence we create the // audio player in Start() and destroy it in Stop(). diff --git a/webrtc/modules/audio_device/audio_device_buffer.cc b/webrtc/modules/audio_device/audio_device_buffer.cc index 83109177c6..e7a5da731a 100644 --- a/webrtc/modules/audio_device/audio_device_buffer.cc +++ b/webrtc/modules/audio_device/audio_device_buffer.cc @@ -409,7 +409,7 @@ int32_t AudioDeviceBuffer::RequestPlayoutData(size_t samples_per_channel) { int32_t AudioDeviceBuffer::GetPlayoutData(void* audio_buffer) { RTC_DCHECK_RUN_ON(&playout_thread_checker_); - RTC_DCHECK_GT(play_buffer_.size(), 0u); + RTC_DCHECK_GT(play_buffer_.size(), 0); const size_t bytes_per_sample = sizeof(int16_t); memcpy(audio_buffer, play_buffer_.data(), play_buffer_.size() * bytes_per_sample); diff --git a/webrtc/modules/audio_device/ios/audio_device_ios.mm b/webrtc/modules/audio_device/ios/audio_device_ios.mm index ed8dbad784..bf6cac7d3c 100644 --- a/webrtc/modules/audio_device/ios/audio_device_ios.mm +++ b/webrtc/modules/audio_device/ios/audio_device_ios.mm @@ -407,9 +407,9 @@ OSStatus AudioDeviceIOS::OnGetPlayoutData(AudioUnitRenderActionFlags* flags, UInt32 num_frames, AudioBufferList* io_data) { // Verify 16-bit, noninterleaved mono PCM signal format. - RTC_DCHECK_EQ(1u, io_data->mNumberBuffers); + RTC_DCHECK_EQ(1, io_data->mNumberBuffers); AudioBuffer* audio_buffer = &io_data->mBuffers[0]; - RTC_DCHECK_EQ(1u, audio_buffer->mNumberChannels); + RTC_DCHECK_EQ(1, audio_buffer->mNumberChannels); // Get pointer to internal audio buffer to which new audio data shall be // written. const size_t size_in_bytes = audio_buffer->mDataByteSize; diff --git a/webrtc/modules/audio_mixer/audio_frame_manipulator.cc b/webrtc/modules/audio_mixer/audio_frame_manipulator.cc index fca9a78b50..255027478a 100644 --- a/webrtc/modules/audio_mixer/audio_frame_manipulator.cc +++ b/webrtc/modules/audio_mixer/audio_frame_manipulator.cc @@ -31,7 +31,7 @@ void Ramp(float start_gain, float target_gain, AudioFrame* audio_frame) { RTC_DCHECK_GE(target_gain, 0.0f); size_t samples = audio_frame->samples_per_channel_; - RTC_DCHECK_LT(0u, samples); + RTC_DCHECK_LT(0, samples); float increment = (target_gain - start_gain) / samples; float gain = start_gain; for (size_t i = 0; i < samples; ++i) { @@ -45,8 +45,8 @@ void Ramp(float start_gain, float target_gain, AudioFrame* audio_frame) { } void RemixFrame(size_t target_number_of_channels, AudioFrame* frame) { - RTC_DCHECK_GE(target_number_of_channels, 1u); - RTC_DCHECK_LE(target_number_of_channels, 2u); + RTC_DCHECK_GE(target_number_of_channels, 1); + RTC_DCHECK_LE(target_number_of_channels, 2); if (frame->num_channels_ == 1 && target_number_of_channels == 2) { AudioFrameOperations::MonoToStereo(frame); } else if (frame->num_channels_ == 2 && target_number_of_channels == 1) { diff --git a/webrtc/modules/audio_processing/aec/aec_core.cc b/webrtc/modules/audio_processing/aec/aec_core.cc index e3fd14c9da..b410c55507 100644 --- a/webrtc/modules/audio_processing/aec/aec_core.cc +++ b/webrtc/modules/audio_processing/aec/aec_core.cc @@ -202,7 +202,7 @@ void BlockBuffer::Insert(const float block[PART_LEN]) { void BlockBuffer::ExtractExtendedBlock(float extended_block[PART_LEN2]) { float* block_ptr = NULL; - RTC_DCHECK_LT(0u, AvaliableSpace()); + RTC_DCHECK_LT(0, AvaliableSpace()); // Extract the previous block. WebRtc_MoveReadPtr(buffer_, -1); @@ -461,7 +461,7 @@ static void UpdateLogRatioMetric(Stats* metric, float numerator, // Average. metric->counter++; // This is to protect overflow, which should almost never happen. - RTC_CHECK_NE(0u, metric->counter); + RTC_CHECK_NE(0, metric->counter); metric->sum += metric->instant; metric->average = metric->sum / metric->counter; @@ -469,7 +469,7 @@ static void UpdateLogRatioMetric(Stats* metric, float numerator, if (metric->instant > metric->average) { metric->hicounter++; // This is to protect overflow, which should almost never happen. - RTC_CHECK_NE(0u, metric->hicounter); + RTC_CHECK_NE(0, metric->hicounter); metric->hisum += metric->instant; metric->himean = metric->hisum / metric->hicounter; } diff --git a/webrtc/modules/audio_processing/aec/aec_resampler.cc b/webrtc/modules/audio_processing/aec/aec_resampler.cc index 2fde934d99..2630841d4a 100644 --- a/webrtc/modules/audio_processing/aec/aec_resampler.cc +++ b/webrtc/modules/audio_processing/aec/aec_resampler.cc @@ -74,7 +74,7 @@ void WebRtcAec_ResampleLinear(void* resampInst, float be, tnew; size_t tn, mm; - RTC_DCHECK_LE(size, 2u * FRAME_LEN); + RTC_DCHECK_LE(size, 2 * FRAME_LEN); RTC_DCHECK(resampInst); RTC_DCHECK(inspeech); RTC_DCHECK(outspeech); diff --git a/webrtc/modules/audio_processing/aecm/aecm_core_neon.cc b/webrtc/modules/audio_processing/aecm/aecm_core_neon.cc index bc368f207c..a34bcabfa2 100644 --- a/webrtc/modules/audio_processing/aecm/aecm_core_neon.cc +++ b/webrtc/modules/audio_processing/aecm/aecm_core_neon.cc @@ -104,9 +104,9 @@ void WebRtcAecm_CalcLinearEnergiesNeon(AecmCore* aecm, void WebRtcAecm_StoreAdaptiveChannelNeon(AecmCore* aecm, const uint16_t* far_spectrum, int32_t* echo_est) { - RTC_DCHECK_EQ(0u, (uintptr_t)echo_est % 32); - RTC_DCHECK_EQ(0u, (uintptr_t)aecm->channelStored % 16); - RTC_DCHECK_EQ(0u, (uintptr_t)aecm->channelAdapt16 % 16); + RTC_DCHECK_EQ(0, (uintptr_t)echo_est % 32); + RTC_DCHECK_EQ(0, (uintptr_t)aecm->channelStored % 16); + RTC_DCHECK_EQ(0, (uintptr_t)aecm->channelAdapt16 % 16); // This is C code of following optimized code. // During startup we store the channel every block. @@ -161,9 +161,9 @@ void WebRtcAecm_StoreAdaptiveChannelNeon(AecmCore* aecm, } void WebRtcAecm_ResetAdaptiveChannelNeon(AecmCore* aecm) { - RTC_DCHECK_EQ(0u, (uintptr_t)aecm->channelStored % 16); - RTC_DCHECK_EQ(0u, (uintptr_t)aecm->channelAdapt16 % 16); - RTC_DCHECK_EQ(0u, (uintptr_t)aecm->channelAdapt32 % 32); + RTC_DCHECK_EQ(0, (uintptr_t)aecm->channelStored % 16); + RTC_DCHECK_EQ(0, (uintptr_t)aecm->channelAdapt16 % 16); + RTC_DCHECK_EQ(0, (uintptr_t)aecm->channelAdapt32 % 32); // The C code of following optimized code. // for (i = 0; i < PART_LEN1; i++) { diff --git a/webrtc/modules/audio_processing/agc/agc.cc b/webrtc/modules/audio_processing/agc/agc.cc index a6256cbe46..3eca1483d5 100644 --- a/webrtc/modules/audio_processing/agc/agc.cc +++ b/webrtc/modules/audio_processing/agc/agc.cc @@ -39,7 +39,7 @@ Agc::Agc() Agc::~Agc() {} float Agc::AnalyzePreproc(const int16_t* audio, size_t length) { - RTC_DCHECK_GT(length, 0u); + RTC_DCHECK_GT(length, 0); size_t num_clipped = 0; for (size_t i = 0; i < length; ++i) { if (audio[i] == 32767 || audio[i] == -32768) diff --git a/webrtc/modules/audio_processing/audio_buffer.cc b/webrtc/modules/audio_processing/audio_buffer.cc index f5b9016a67..02b8537c07 100644 --- a/webrtc/modules/audio_processing/audio_buffer.cc +++ b/webrtc/modules/audio_processing/audio_buffer.cc @@ -62,11 +62,11 @@ AudioBuffer::AudioBuffer(size_t input_num_frames, activity_(AudioFrame::kVadUnknown), keyboard_data_(NULL), data_(new IFChannelBuffer(proc_num_frames_, num_proc_channels_)) { - RTC_DCHECK_GT(input_num_frames_, 0u); - RTC_DCHECK_GT(proc_num_frames_, 0u); - RTC_DCHECK_GT(output_num_frames_, 0u); - RTC_DCHECK_GT(num_input_channels_, 0u); - RTC_DCHECK_GT(num_proc_channels_, 0u); + RTC_DCHECK_GT(input_num_frames_, 0); + RTC_DCHECK_GT(proc_num_frames_, 0); + RTC_DCHECK_GT(output_num_frames_, 0); + RTC_DCHECK_GT(num_input_channels_, 0); + RTC_DCHECK_GT(num_proc_channels_, 0); RTC_DCHECK_LE(num_proc_channels_, num_input_channels_); if (input_num_frames_ != proc_num_frames_ || diff --git a/webrtc/modules/audio_processing/audio_processing_impl.cc b/webrtc/modules/audio_processing/audio_processing_impl.cc index 39c79cdf5c..061495d9a2 100644 --- a/webrtc/modules/audio_processing/audio_processing_impl.cc +++ b/webrtc/modules/audio_processing/audio_processing_impl.cc @@ -813,7 +813,7 @@ void AudioProcessingImpl::QueueRenderAudio(AudioBuffer* audio) { num_reverse_channels(), &aec_render_queue_buffer_); - RTC_DCHECK_GE(160u, audio->num_frames_per_band()); + RTC_DCHECK_GE(160, audio->num_frames_per_band()); // Insert the samples into the queue. if (!aec_render_signal_queue_->Insert(&aec_render_queue_buffer_)) { diff --git a/webrtc/modules/audio_processing/beamformer/array_util.cc b/webrtc/modules/audio_processing/beamformer/array_util.cc index 6b1c474269..244f5c88e8 100644 --- a/webrtc/modules/audio_processing/beamformer/array_util.cc +++ b/webrtc/modules/audio_processing/beamformer/array_util.cc @@ -23,7 +23,7 @@ const float kMaxDotProduct = 1e-6f; } // namespace float GetMinimumSpacing(const std::vector& array_geometry) { - RTC_CHECK_GT(array_geometry.size(), 1u); + RTC_CHECK_GT(array_geometry.size(), 1); float mic_spacing = std::numeric_limits::max(); for (size_t i = 0; i < (array_geometry.size() - 1); ++i) { for (size_t j = i + 1; j < array_geometry.size(); ++j) { @@ -58,7 +58,7 @@ bool ArePerpendicular(const Point& a, const Point& b) { rtc::Optional GetDirectionIfLinear( const std::vector& array_geometry) { - RTC_DCHECK_GT(array_geometry.size(), 1u); + RTC_DCHECK_GT(array_geometry.size(), 1); const Point first_pair_direction = PairDirection(array_geometry[0], array_geometry[1]); for (size_t i = 2u; i < array_geometry.size(); ++i) { @@ -73,7 +73,7 @@ rtc::Optional GetDirectionIfLinear( rtc::Optional GetNormalIfPlanar( const std::vector& array_geometry) { - RTC_DCHECK_GT(array_geometry.size(), 1u); + RTC_DCHECK_GT(array_geometry.size(), 1); const Point first_pair_direction = PairDirection(array_geometry[0], array_geometry[1]); Point pair_direction(0.f, 0.f, 0.f); diff --git a/webrtc/modules/audio_processing/beamformer/covariance_matrix_generator.cc b/webrtc/modules/audio_processing/beamformer/covariance_matrix_generator.cc index 5ca79c6475..ae69073a89 100644 --- a/webrtc/modules/audio_processing/beamformer/covariance_matrix_generator.cc +++ b/webrtc/modules/audio_processing/beamformer/covariance_matrix_generator.cc @@ -27,7 +27,7 @@ float BesselJ0(float x) { // Calculates the Euclidean norm for a row vector. float Norm(const ComplexMatrix& x) { - RTC_CHECK_EQ(1u, x.num_rows()); + RTC_CHECK_EQ(1, x.num_rows()); const size_t length = x.num_columns(); const complex* elems = x.elements()[0]; float result = 0.f; @@ -94,7 +94,7 @@ void CovarianceMatrixGenerator::PhaseAlignmentMasks( const std::vector& geometry, float angle, ComplexMatrix* mat) { - RTC_CHECK_EQ(1u, mat->num_rows()); + RTC_CHECK_EQ(1, mat->num_rows()); RTC_CHECK_EQ(geometry.size(), mat->num_columns()); float freq_in_hertz = diff --git a/webrtc/modules/audio_processing/beamformer/nonlinear_beamformer.cc b/webrtc/modules/audio_processing/beamformer/nonlinear_beamformer.cc index 5d9d32a80d..425ffa0e0b 100644 --- a/webrtc/modules/audio_processing/beamformer/nonlinear_beamformer.cc +++ b/webrtc/modules/audio_processing/beamformer/nonlinear_beamformer.cc @@ -79,7 +79,7 @@ const float kCompensationGain = 2.f; // The returned norm is clamped to be non-negative. float Norm(const ComplexMatrix& mat, const ComplexMatrix& norm_mat) { - RTC_CHECK_EQ(1u, norm_mat.num_rows()); + RTC_CHECK_EQ(1, norm_mat.num_rows()); RTC_CHECK_EQ(norm_mat.num_columns(), mat.num_rows()); RTC_CHECK_EQ(norm_mat.num_columns(), mat.num_columns()); @@ -102,8 +102,8 @@ float Norm(const ComplexMatrix& mat, // Does conjugate(|lhs|) * |rhs| for row vectors |lhs| and |rhs|. complex ConjugateDotProduct(const ComplexMatrix& lhs, const ComplexMatrix& rhs) { - RTC_CHECK_EQ(1u, lhs.num_rows()); - RTC_CHECK_EQ(1u, rhs.num_rows()); + RTC_CHECK_EQ(1, lhs.num_rows()); + RTC_CHECK_EQ(1, rhs.num_rows()); RTC_CHECK_EQ(lhs.num_columns(), rhs.num_columns()); const complex* const* lhs_elements = lhs.elements(); @@ -138,7 +138,7 @@ float SumSquares(const ComplexMatrix& mat) { // Does |out| = |in|.' * conj(|in|) for row vector |in|. void TransposedConjugatedProduct(const ComplexMatrix& in, ComplexMatrix* out) { - RTC_CHECK_EQ(1u, in.num_rows()); + RTC_CHECK_EQ(1, in.num_rows()); RTC_CHECK_EQ(out->num_rows(), in.num_columns()); RTC_CHECK_EQ(out->num_columns(), in.num_columns()); const complex* in_elements = in.elements()[0]; @@ -449,7 +449,7 @@ void NonlinearBeamformer::ProcessAudioBlock(const complex_f* const* input, complex_f* const* output) { RTC_CHECK_EQ(kNumFreqBins, num_freq_bins); RTC_CHECK_EQ(num_input_channels_, num_input_channels); - RTC_CHECK_EQ(0u, num_output_channels); + RTC_CHECK_EQ(0, num_output_channels); // Calculating the post-filter masks. Note that we need two for each // frequency bin to account for the positive and negative interferer diff --git a/webrtc/modules/audio_processing/echo_cancellation_impl.cc b/webrtc/modules/audio_processing/echo_cancellation_impl.cc index 0b8fc141ee..f6a0bcde7a 100644 --- a/webrtc/modules/audio_processing/echo_cancellation_impl.cc +++ b/webrtc/modules/audio_processing/echo_cancellation_impl.cc @@ -151,7 +151,7 @@ int EchoCancellationImpl::ProcessCaptureAudio(AudioBuffer* audio, } RTC_DCHECK(stream_properties_); - RTC_DCHECK_GE(160u, audio->num_frames_per_band()); + RTC_DCHECK_GE(160, audio->num_frames_per_band()); RTC_DCHECK_EQ(audio->num_channels(), stream_properties_->num_proc_channels); int err = AudioProcessing::kNoError; @@ -450,7 +450,7 @@ void EchoCancellationImpl::PackRenderAudioBuffer( size_t num_output_channels, size_t num_channels, std::vector* packed_buffer) { - RTC_DCHECK_GE(160u, audio->num_frames_per_band()); + RTC_DCHECK_GE(160, audio->num_frames_per_band()); RTC_DCHECK_EQ(num_channels, audio->num_channels()); packed_buffer->clear(); diff --git a/webrtc/modules/audio_processing/echo_control_mobile_impl.cc b/webrtc/modules/audio_processing/echo_control_mobile_impl.cc index cfc4249804..e8b163b894 100644 --- a/webrtc/modules/audio_processing/echo_control_mobile_impl.cc +++ b/webrtc/modules/audio_processing/echo_control_mobile_impl.cc @@ -154,7 +154,7 @@ void EchoControlMobileImpl::PackRenderAudioBuffer( size_t num_output_channels, size_t num_channels, std::vector* packed_buffer) { - RTC_DCHECK_GE(160u, audio->num_frames_per_band()); + RTC_DCHECK_GE(160, audio->num_frames_per_band()); RTC_DCHECK_EQ(num_channels, audio->num_channels()); // The ordering convention must be followed to pass to the correct AECM. @@ -187,7 +187,7 @@ int EchoControlMobileImpl::ProcessCaptureAudio(AudioBuffer* audio, } RTC_DCHECK(stream_properties_); - RTC_DCHECK_GE(160u, audio->num_frames_per_band()); + RTC_DCHECK_GE(160, audio->num_frames_per_band()); RTC_DCHECK_EQ(audio->num_channels(), stream_properties_->num_output_channels); RTC_DCHECK_GE(cancellers_.size(), stream_properties_->num_reverse_channels * audio->num_channels()); diff --git a/webrtc/modules/audio_processing/gain_control_impl.cc b/webrtc/modules/audio_processing/gain_control_impl.cc index 81469dde01..704cfade09 100644 --- a/webrtc/modules/audio_processing/gain_control_impl.cc +++ b/webrtc/modules/audio_processing/gain_control_impl.cc @@ -123,7 +123,7 @@ void GainControlImpl::ProcessRenderAudio( void GainControlImpl::PackRenderAudioBuffer( AudioBuffer* audio, std::vector* packed_buffer) { - RTC_DCHECK_GE(160u, audio->num_frames_per_band()); + RTC_DCHECK_GE(160, audio->num_frames_per_band()); packed_buffer->clear(); packed_buffer->insert( @@ -139,7 +139,7 @@ int GainControlImpl::AnalyzeCaptureAudio(AudioBuffer* audio) { } RTC_DCHECK(num_proc_channels_); - RTC_DCHECK_GE(160u, audio->num_frames_per_band()); + RTC_DCHECK_GE(160, audio->num_frames_per_band()); RTC_DCHECK_EQ(audio->num_channels(), *num_proc_channels_); RTC_DCHECK_LE(*num_proc_channels_, gain_controllers_.size()); @@ -190,7 +190,7 @@ int GainControlImpl::ProcessCaptureAudio(AudioBuffer* audio, } RTC_DCHECK(num_proc_channels_); - RTC_DCHECK_GE(160u, audio->num_frames_per_band()); + RTC_DCHECK_GE(160, audio->num_frames_per_band()); RTC_DCHECK_EQ(audio->num_channels(), *num_proc_channels_); stream_is_saturated_ = false; diff --git a/webrtc/modules/audio_processing/intelligibility/intelligibility_enhancer.cc b/webrtc/modules/audio_processing/intelligibility/intelligibility_enhancer.cc index f9d1c3c273..7ff2cf4042 100644 --- a/webrtc/modules/audio_processing/intelligibility/intelligibility_enhancer.cc +++ b/webrtc/modules/audio_processing/intelligibility/intelligibility_enhancer.cc @@ -58,7 +58,7 @@ void MapToErbBands(const float* pow, const std::vector>& filter_bank, float* result) { for (size_t i = 0; i < filter_bank.size(); ++i) { - RTC_DCHECK_GT(filter_bank[i].size(), 0u); + RTC_DCHECK_GT(filter_bank[i].size(), 0); result[i] = kPowerNormalizationFactor * DotProduct(filter_bank[i].data(), pow, filter_bank[i].size()); } @@ -380,7 +380,7 @@ bool IntelligibilityEnhancer::IsSpeech(const float* audio) { } void IntelligibilityEnhancer::DelayHighBands(AudioBuffer* audio) { - RTC_DCHECK_EQ(audio->num_bands(), high_bands_buffers_.size() + 1u); + RTC_DCHECK_EQ(audio->num_bands(), high_bands_buffers_.size() + 1); for (size_t i = 0u; i < high_bands_buffers_.size(); ++i) { Band band = static_cast(i + 1); high_bands_buffers_[i]->Delay(audio->split_channels_f(band), chunk_length_); diff --git a/webrtc/modules/audio_processing/level_controller/level_controller.cc b/webrtc/modules/audio_processing/level_controller/level_controller.cc index b8388e6141..c625e08eae 100644 --- a/webrtc/modules/audio_processing/level_controller/level_controller.cc +++ b/webrtc/modules/audio_processing/level_controller/level_controller.cc @@ -208,8 +208,8 @@ void LevelController::Initialize(int sample_rate_hz) { } void LevelController::Process(AudioBuffer* audio) { - RTC_DCHECK_LT(0u, audio->num_channels()); - RTC_DCHECK_GE(2u, audio->num_channels()); + RTC_DCHECK_LT(0, audio->num_channels()); + RTC_DCHECK_GE(2, audio->num_channels()); RTC_DCHECK_NE(0.f, dc_forgetting_factor_); RTC_DCHECK(sample_rate_hz_); data_dumper_->DumpWav("lc_input", audio->num_frames(), diff --git a/webrtc/modules/audio_processing/level_controller/noise_spectrum_estimator.cc b/webrtc/modules/audio_processing/level_controller/noise_spectrum_estimator.cc index af718685cf..2fbe200fa7 100644 --- a/webrtc/modules/audio_processing/level_controller/noise_spectrum_estimator.cc +++ b/webrtc/modules/audio_processing/level_controller/noise_spectrum_estimator.cc @@ -34,7 +34,7 @@ void NoiseSpectrumEstimator::Initialize() { void NoiseSpectrumEstimator::Update(rtc::ArrayView spectrum, bool first_update) { - RTC_DCHECK_EQ(65u, spectrum.size()); + RTC_DCHECK_EQ(65, spectrum.size()); if (first_update) { // Initialize the noise spectral estimate with the signal spectrum. diff --git a/webrtc/modules/audio_processing/level_controller/signal_classifier.cc b/webrtc/modules/audio_processing/level_controller/signal_classifier.cc index dd67737403..f38dfb2e13 100644 --- a/webrtc/modules/audio_processing/level_controller/signal_classifier.cc +++ b/webrtc/modules/audio_processing/level_controller/signal_classifier.cc @@ -25,7 +25,7 @@ namespace webrtc { namespace { void RemoveDcLevel(rtc::ArrayView x) { - RTC_DCHECK_LT(0u, x.size()); + RTC_DCHECK_LT(0, x.size()); float mean = std::accumulate(x.data(), x.data() + x.size(), 0.f); mean /= x.size(); @@ -37,8 +37,8 @@ void RemoveDcLevel(rtc::ArrayView x) { void PowerSpectrum(const OouraFft* ooura_fft, rtc::ArrayView x, rtc::ArrayView spectrum) { - RTC_DCHECK_EQ(65u, spectrum.size()); - RTC_DCHECK_EQ(128u, x.size()); + RTC_DCHECK_EQ(65, spectrum.size()); + RTC_DCHECK_EQ(128, x.size()); float X[128]; std::copy(x.data(), x.data() + x.size(), X); ooura_fft->Fft(X); diff --git a/webrtc/modules/audio_processing/low_cut_filter.cc b/webrtc/modules/audio_processing/low_cut_filter.cc index 77dab9af43..703535cb1d 100644 --- a/webrtc/modules/audio_processing/low_cut_filter.cc +++ b/webrtc/modules/audio_processing/low_cut_filter.cc @@ -91,7 +91,7 @@ LowCutFilter::~LowCutFilter() {} void LowCutFilter::Process(AudioBuffer* audio) { RTC_DCHECK(audio); - RTC_DCHECK_GE(160u, audio->num_frames_per_band()); + RTC_DCHECK_GE(160, audio->num_frames_per_band()); RTC_DCHECK_EQ(filters_.size(), audio->num_channels()); for (size_t i = 0; i < filters_.size(); i++) { filters_[i]->Process(audio->split_bands(i)[kBand0To8kHz], diff --git a/webrtc/modules/audio_processing/noise_suppression_impl.cc b/webrtc/modules/audio_processing/noise_suppression_impl.cc index e1c9fdcd01..628b951f57 100644 --- a/webrtc/modules/audio_processing/noise_suppression_impl.cc +++ b/webrtc/modules/audio_processing/noise_suppression_impl.cc @@ -76,7 +76,7 @@ void NoiseSuppressionImpl::AnalyzeCaptureAudio(AudioBuffer* audio) { return; } - RTC_DCHECK_GE(160u, audio->num_frames_per_band()); + RTC_DCHECK_GE(160, audio->num_frames_per_band()); RTC_DCHECK_EQ(suppressors_.size(), audio->num_channels()); for (size_t i = 0; i < suppressors_.size(); i++) { WebRtcNs_Analyze(suppressors_[i]->state(), @@ -92,7 +92,7 @@ void NoiseSuppressionImpl::ProcessCaptureAudio(AudioBuffer* audio) { return; } - RTC_DCHECK_GE(160u, audio->num_frames_per_band()); + RTC_DCHECK_GE(160, audio->num_frames_per_band()); RTC_DCHECK_EQ(suppressors_.size(), audio->num_channels()); for (size_t i = 0; i < suppressors_.size(); i++) { #if defined(WEBRTC_NS_FLOAT) diff --git a/webrtc/modules/audio_processing/residual_echo_detector.cc b/webrtc/modules/audio_processing/residual_echo_detector.cc index 0e58b497fe..45ef1809f0 100644 --- a/webrtc/modules/audio_processing/residual_echo_detector.cc +++ b/webrtc/modules/audio_processing/residual_echo_detector.cc @@ -130,7 +130,7 @@ void ResidualEchoDetector::Initialize() { void ResidualEchoDetector::PackRenderAudioBuffer( AudioBuffer* audio, std::vector* packed_buffer) { - RTC_DCHECK_GE(160u, audio->num_frames_per_band()); + RTC_DCHECK_GE(160, audio->num_frames_per_band()); packed_buffer->clear(); packed_buffer->insert(packed_buffer->end(), diff --git a/webrtc/modules/audio_processing/test/test_utils.cc b/webrtc/modules/audio_processing/test/test_utils.cc index 95490f00a9..24e9b0ebd2 100644 --- a/webrtc/modules/audio_processing/test/test_utils.cc +++ b/webrtc/modules/audio_processing/test/test_utils.cc @@ -136,7 +136,7 @@ std::vector ParseArrayGeometry(const std::string& mic_positions) { const std::vector values = ParseList(mic_positions); const size_t num_mics = rtc::CheckedDivExact(values.size(), static_cast(3)); - RTC_CHECK_GT(num_mics, 0u) << "mic_positions is not large enough."; + RTC_CHECK_GT(num_mics, 0) << "mic_positions is not large enough."; std::vector result; result.reserve(num_mics); diff --git a/webrtc/modules/audio_processing/transient/moving_moments.cc b/webrtc/modules/audio_processing/transient/moving_moments.cc index bc0b6f0b91..8bca505aef 100644 --- a/webrtc/modules/audio_processing/transient/moving_moments.cc +++ b/webrtc/modules/audio_processing/transient/moving_moments.cc @@ -22,7 +22,7 @@ MovingMoments::MovingMoments(size_t length) queue_(), sum_(0.0), sum_of_squares_(0.0) { - RTC_DCHECK_GT(length, 0u); + RTC_DCHECK_GT(length, 0); for (size_t i = 0; i < length; ++i) { queue_.push(0.0); } diff --git a/webrtc/modules/audio_processing/transient/wpd_node.cc b/webrtc/modules/audio_processing/transient/wpd_node.cc index a689827e9a..de382b4242 100644 --- a/webrtc/modules/audio_processing/transient/wpd_node.cc +++ b/webrtc/modules/audio_processing/transient/wpd_node.cc @@ -29,9 +29,9 @@ WPDNode::WPDNode(size_t length, filter_(FIRFilter::Create(coefficients, coefficients_length, 2 * length + 1)) { - RTC_DCHECK_GT(length, 0u); + RTC_DCHECK_GT(length, 0); RTC_DCHECK(coefficients); - RTC_DCHECK_GT(coefficients_length, 0u); + RTC_DCHECK_GT(coefficients_length, 0); memset(data_.get(), 0.f, (2 * length + 1) * sizeof(data_[0])); } diff --git a/webrtc/modules/audio_processing/voice_detection_impl.cc b/webrtc/modules/audio_processing/voice_detection_impl.cc index a0702e868e..5365ed083c 100644 --- a/webrtc/modules/audio_processing/voice_detection_impl.cc +++ b/webrtc/modules/audio_processing/voice_detection_impl.cc @@ -63,7 +63,7 @@ void VoiceDetectionImpl::ProcessCaptureAudio(AudioBuffer* audio) { return; } - RTC_DCHECK_GE(160u, audio->num_frames_per_band()); + RTC_DCHECK_GE(160, audio->num_frames_per_band()); // TODO(ajm): concatenate data in frame buffer here. int vad_ret = WebRtcVad_Process(vad_->state(), sample_rate_hz_, audio->mixed_low_pass_data(), diff --git a/webrtc/modules/pacing/bitrate_prober.cc b/webrtc/modules/pacing/bitrate_prober.cc index fde2f65552..431aa21881 100644 --- a/webrtc/modules/pacing/bitrate_prober.cc +++ b/webrtc/modules/pacing/bitrate_prober.cc @@ -27,7 +27,7 @@ constexpr int kInactivityThresholdMs = 5000; constexpr int kMinProbeDeltaMs = 1; int ComputeDeltaFromBitrate(size_t probe_size, uint32_t bitrate_bps) { - RTC_CHECK_GT(bitrate_bps, 0u); + RTC_CHECK_GT(bitrate_bps, 0); // Compute the time delta needed to send probe_size bytes at bitrate_bps // bps. Result is in milliseconds. return static_cast((1000ll * probe_size * 8) / bitrate_bps); @@ -153,7 +153,7 @@ size_t BitrateProber::RecommendedMinProbeSize() const { void BitrateProber::ProbeSent(int64_t now_ms, size_t bytes) { RTC_DCHECK(probing_state_ == ProbingState::kActive); - RTC_DCHECK_GT(bytes, 0u); + RTC_DCHECK_GT(bytes, 0); probe_size_last_sent_ = bytes; time_last_probe_sent_ms_ = now_ms; if (!clusters_.empty()) { diff --git a/webrtc/modules/pacing/paced_sender.cc b/webrtc/modules/pacing/paced_sender.cc index 00523e61b7..b3fc16d769 100644 --- a/webrtc/modules/pacing/paced_sender.cc +++ b/webrtc/modules/pacing/paced_sender.cc @@ -129,7 +129,7 @@ class PacketQueue { packet_list_.erase(packet.this_it); RTC_DCHECK_EQ(packet_list_.size(), prio_queue_.size()); if (packet_list_.empty()) - RTC_DCHECK_EQ(0u, queue_time_sum_); + RTC_DCHECK_EQ(0, queue_time_sum_); } bool Empty() const { return prio_queue_.empty(); } @@ -285,7 +285,7 @@ void PacedSender::Resume() { } void PacedSender::SetProbingEnabled(bool enabled) { - RTC_CHECK_EQ(0u, packet_counter_); + RTC_CHECK_EQ(0, packet_counter_); CriticalSectionScoped cs(critsect_.get()); prober_->SetEnabled(enabled); } @@ -338,7 +338,7 @@ void PacedSender::InsertPacket(RtpPacketSender::Priority priority, int64_t PacedSender::ExpectedQueueTimeMs() const { CriticalSectionScoped cs(critsect_.get()); - RTC_DCHECK_GT(pacing_bitrate_kbps_, 0u); + RTC_DCHECK_GT(pacing_bitrate_kbps_, 0); return static_cast(packets_->SizeInBytes() * 8 / pacing_bitrate_kbps_); } diff --git a/webrtc/modules/remote_bitrate_estimator/remote_bitrate_estimator_unittest_helper.cc b/webrtc/modules/remote_bitrate_estimator/remote_bitrate_estimator_unittest_helper.cc index 3c1a914d28..b77550f121 100644 --- a/webrtc/modules/remote_bitrate_estimator/remote_bitrate_estimator_unittest_helper.cc +++ b/webrtc/modules/remote_bitrate_estimator/remote_bitrate_estimator_unittest_helper.cc @@ -247,7 +247,7 @@ void RemoteBitrateEstimatorTest::IncomingPacket(uint32_t ssrc, // target bitrate after the call to this function. bool RemoteBitrateEstimatorTest::GenerateAndProcessFrame(uint32_t ssrc, uint32_t bitrate_bps) { - RTC_DCHECK_GT(bitrate_bps, 0u); + RTC_DCHECK_GT(bitrate_bps, 0); stream_generator_->SetBitrateBps(bitrate_bps); testing::RtpStream::PacketList packets; int64_t next_time_us = stream_generator_->GenerateFrame( diff --git a/webrtc/modules/rtp_rtcp/source/forward_error_correction.cc b/webrtc/modules/rtp_rtcp/source/forward_error_correction.cc index 568ba8afbc..7a3b1583d8 100644 --- a/webrtc/modules/rtp_rtcp/source/forward_error_correction.cc +++ b/webrtc/modules/rtp_rtcp/source/forward_error_correction.cc @@ -103,7 +103,7 @@ int ForwardErrorCorrection::EncodeFec(const PacketList& media_packets, const size_t num_media_packets = media_packets.size(); // Sanity check arguments. - RTC_DCHECK_GT(num_media_packets, 0u); + RTC_DCHECK_GT(num_media_packets, 0); RTC_DCHECK_GE(num_important_packets, 0); RTC_DCHECK_LE(static_cast(num_important_packets), num_media_packets); RTC_DCHECK(fec_packets->empty()); @@ -239,7 +239,7 @@ void ForwardErrorCorrection::GenerateFecPayloads( pkt_mask_idx += media_pkt_idx / 8; media_pkt_idx %= 8; } - RTC_DCHECK_GT(fec_packet->length, 0u) + RTC_DCHECK_GT(fec_packet->length, 0) << "Packet mask is wrong or poorly designed."; } } diff --git a/webrtc/modules/rtp_rtcp/source/rtcp_packet.cc b/webrtc/modules/rtp_rtcp/source/rtcp_packet.cc index 5339c656e5..a2d99e7143 100644 --- a/webrtc/modules/rtp_rtcp/source/rtcp_packet.cc +++ b/webrtc/modules/rtp_rtcp/source/rtcp_packet.cc @@ -50,8 +50,8 @@ bool RtcpPacket::OnBufferFull(uint8_t* packet, size_t RtcpPacket::HeaderLength() const { size_t length_in_bytes = BlockLength(); - RTC_DCHECK_GT(length_in_bytes, 0u); - RTC_DCHECK_EQ(length_in_bytes % 4, 0u) << "Padding not supported"; + RTC_DCHECK_GT(length_in_bytes, 0); + RTC_DCHECK_EQ(length_in_bytes % 4, 0) << "Padding not supported"; // Length in 32-bit words without common header. return (length_in_bytes - kHeaderLength) / 4; } diff --git a/webrtc/modules/rtp_rtcp/source/rtcp_packet/app.cc b/webrtc/modules/rtp_rtcp/source/rtcp_packet/app.cc index a2d37a4dfc..322bf363b4 100644 --- a/webrtc/modules/rtp_rtcp/source/rtcp_packet/app.cc +++ b/webrtc/modules/rtp_rtcp/source/rtcp_packet/app.cc @@ -58,7 +58,7 @@ void App::SetSubType(uint8_t subtype) { void App::SetData(const uint8_t* data, size_t data_length) { RTC_DCHECK(data); - RTC_DCHECK_EQ(data_length % 4, 0u) << "Data must be 32 bits aligned."; + RTC_DCHECK_EQ(data_length % 4, 0) << "Data must be 32 bits aligned."; RTC_DCHECK_LE(data_length, kMaxDataSize) << "App data size " << data_length << " exceed maximum of " << kMaxDataSize << " bytes."; diff --git a/webrtc/modules/rtp_rtcp/source/rtcp_packet/bye.cc b/webrtc/modules/rtp_rtcp/source/rtcp_packet/bye.cc index cdb45b0d5f..494c8708f1 100644 --- a/webrtc/modules/rtp_rtcp/source/rtcp_packet/bye.cc +++ b/webrtc/modules/rtp_rtcp/source/rtcp_packet/bye.cc @@ -101,7 +101,7 @@ bool Bye::Create(uint8_t* packet, *index += reason_length; // Add padding bytes if needed. size_t bytes_to_pad = index_end - *index; - RTC_DCHECK_LE(bytes_to_pad, 3u); + RTC_DCHECK_LE(bytes_to_pad, 3); if (bytes_to_pad > 0) { memset(&packet[*index], 0, bytes_to_pad); *index += bytes_to_pad; diff --git a/webrtc/modules/rtp_rtcp/source/rtcp_packet/fir.cc b/webrtc/modules/rtp_rtcp/source/rtcp_packet/fir.cc index 69df03a000..7f62e18c9b 100644 --- a/webrtc/modules/rtp_rtcp/source/rtcp_packet/fir.cc +++ b/webrtc/modules/rtp_rtcp/source/rtcp_packet/fir.cc @@ -84,7 +84,7 @@ bool Fir::Create(uint8_t* packet, size_t index_end = *index + BlockLength(); CreateHeader(kFeedbackMessageType, kPacketType, HeaderLength(), packet, index); - RTC_DCHECK_EQ(Psfb::media_ssrc(), 0u); + RTC_DCHECK_EQ(Psfb::media_ssrc(), 0); CreateCommonFeedback(packet + *index); *index += kCommonFeedbackLength; diff --git a/webrtc/modules/rtp_rtcp/source/rtcp_packet/remb.cc b/webrtc/modules/rtp_rtcp/source/rtcp_packet/remb.cc index ac5fc1a68f..ec7b51ad00 100644 --- a/webrtc/modules/rtp_rtcp/source/rtcp_packet/remb.cc +++ b/webrtc/modules/rtp_rtcp/source/rtcp_packet/remb.cc @@ -103,7 +103,7 @@ bool Remb::Create(uint8_t* packet, size_t index_end = *index + BlockLength(); CreateHeader(kFeedbackMessageType, kPacketType, HeaderLength(), packet, index); - RTC_DCHECK_EQ(0u, Psfb::media_ssrc()); + RTC_DCHECK_EQ(0, Psfb::media_ssrc()); CreateCommonFeedback(packet + *index); *index += kCommonFeedbackLength; diff --git a/webrtc/modules/rtp_rtcp/source/rtcp_packet/report_block.cc b/webrtc/modules/rtp_rtcp/source/rtcp_packet/report_block.cc index 8015fa398b..e597748027 100644 --- a/webrtc/modules/rtp_rtcp/source/rtcp_packet/report_block.cc +++ b/webrtc/modules/rtp_rtcp/source/rtcp_packet/report_block.cc @@ -65,7 +65,7 @@ bool ReportBlock::Parse(const uint8_t* buffer, size_t length) { void ReportBlock::Create(uint8_t* buffer) const { // Runtime check should be done while setting cumulative_lost. - RTC_DCHECK_LT(cumulative_lost(), (1u << 24)); // Have only 3 bytes for it. + RTC_DCHECK_LT(cumulative_lost(), (1 << 24)); // Have only 3 bytes for it. ByteWriter::WriteBigEndian(&buffer[0], source_ssrc()); ByteWriter::WriteBigEndian(&buffer[4], fraction_lost()); diff --git a/webrtc/modules/rtp_rtcp/source/rtcp_packet/tmmbn.cc b/webrtc/modules/rtp_rtcp/source/rtcp_packet/tmmbn.cc index a0b785c596..702afd8a8c 100644 --- a/webrtc/modules/rtp_rtcp/source/rtcp_packet/tmmbn.cc +++ b/webrtc/modules/rtp_rtcp/source/rtcp_packet/tmmbn.cc @@ -86,7 +86,7 @@ bool Tmmbn::Create(uint8_t* packet, CreateHeader(kFeedbackMessageType, kPacketType, HeaderLength(), packet, index); - RTC_DCHECK_EQ(0u, Rtpfb::media_ssrc()); + RTC_DCHECK_EQ(0, Rtpfb::media_ssrc()); CreateCommonFeedback(packet + *index); *index += kCommonFeedbackLength; for (const TmmbItem& item : items_) { diff --git a/webrtc/modules/rtp_rtcp/source/rtcp_packet/tmmbr.cc b/webrtc/modules/rtp_rtcp/source/rtcp_packet/tmmbr.cc index b4b8ccba4e..0ba131187b 100644 --- a/webrtc/modules/rtp_rtcp/source/rtcp_packet/tmmbr.cc +++ b/webrtc/modules/rtp_rtcp/source/rtcp_packet/tmmbr.cc @@ -88,7 +88,7 @@ bool Tmmbr::Create(uint8_t* packet, CreateHeader(kFeedbackMessageType, kPacketType, HeaderLength(), packet, index); - RTC_DCHECK_EQ(0u, Rtpfb::media_ssrc()); + RTC_DCHECK_EQ(0, Rtpfb::media_ssrc()); CreateCommonFeedback(packet + *index); *index += kCommonFeedbackLength; for (const TmmbItem& item : items_) { diff --git a/webrtc/modules/rtp_rtcp/source/rtcp_packet/transport_feedback.cc b/webrtc/modules/rtp_rtcp/source/rtcp_packet/transport_feedback.cc index 9008aa0939..3a5a3038be 100644 --- a/webrtc/modules/rtp_rtcp/source/rtcp_packet/transport_feedback.cc +++ b/webrtc/modules/rtp_rtcp/source/rtcp_packet/transport_feedback.cc @@ -141,13 +141,13 @@ class OneBitVectorChunk : public TransportFeedback::PacketStatusChunk { buffer[0] = 0x80u; for (int i = 0; i < kSymbolsInFirstByte; ++i) { uint8_t encoded_symbol = EncodeSymbol(symbols_[i]); - RTC_DCHECK_LE(encoded_symbol, 1u); + RTC_DCHECK_LE(encoded_symbol, 1); buffer[0] |= encoded_symbol << (kSymbolsInFirstByte - (i + 1)); } buffer[1] = 0x00u; for (int i = 0; i < kSymbolsInSecondByte; ++i) { uint8_t encoded_symbol = EncodeSymbol(symbols_[i + kSymbolsInFirstByte]); - RTC_DCHECK_LE(encoded_symbol, 1u); + RTC_DCHECK_LE(encoded_symbol, 1); buffer[1] |= encoded_symbol << (kSymbolsInSecondByte - (i + 1)); } } diff --git a/webrtc/modules/rtp_rtcp/source/rtp_format_h264.cc b/webrtc/modules/rtp_rtcp/source/rtp_format_h264.cc index b32e78ef9a..2344b2820c 100644 --- a/webrtc/modules/rtp_rtcp/source/rtp_format_h264.cc +++ b/webrtc/modules/rtp_rtcp/source/rtp_format_h264.cc @@ -194,7 +194,7 @@ void RtpPacketizerH264::PacketizeFuA(size_t fragment_index) { offset += packet_length; fragment_length -= packet_length; } - RTC_CHECK_EQ(0u, fragment_length); + RTC_CHECK_EQ(0, fragment_length); } size_t RtpPacketizerH264::PacketizeStapA(size_t fragment_index) { @@ -205,7 +205,7 @@ size_t RtpPacketizerH264::PacketizeStapA(size_t fragment_index) { const Fragment* fragment = &input_fragments_[fragment_index]; RTC_CHECK_GE(payload_size_left, fragment->length); while (payload_size_left >= fragment->length + fragment_headers_length) { - RTC_CHECK_GT(fragment->length, 0u); + RTC_CHECK_GT(fragment->length, 0); packets_.push(PacketUnit(*fragment, aggregated_fragments == 0, false, true, fragment->buffer[0])); payload_size_left -= fragment->length; diff --git a/webrtc/modules/rtp_rtcp/source/rtp_packet.cc b/webrtc/modules/rtp_rtcp/source/rtp_packet.cc index 245ea8b352..72fd7892b2 100644 --- a/webrtc/modules/rtp_rtcp/source/rtp_packet.cc +++ b/webrtc/modules/rtp_rtcp/source/rtp_packet.cc @@ -253,9 +253,9 @@ void Packet::SetSsrc(uint32_t ssrc) { } void Packet::SetCsrcs(const std::vector& csrcs) { - RTC_DCHECK_EQ(num_extensions_, 0u); - RTC_DCHECK_EQ(payload_size_, 0u); - RTC_DCHECK_EQ(padding_size_, 0u); + RTC_DCHECK_EQ(num_extensions_, 0); + RTC_DCHECK_EQ(payload_size_, 0); + RTC_DCHECK_EQ(padding_size_, 0); RTC_DCHECK_LE(csrcs.size(), 0x0fu); RTC_DCHECK_LE(kFixedHeaderSize + 4 * csrcs.size(), capacity()); payload_offset_ = kFixedHeaderSize + 4 * csrcs.size(); @@ -269,7 +269,7 @@ void Packet::SetCsrcs(const std::vector& csrcs) { } uint8_t* Packet::AllocatePayload(size_t size_bytes) { - RTC_DCHECK_EQ(padding_size_, 0u); + RTC_DCHECK_EQ(padding_size_, 0); if (payload_offset_ + size_bytes > capacity()) { LOG(LS_WARNING) << "Cannot set payload, not enough space in buffer."; return nullptr; @@ -283,7 +283,7 @@ uint8_t* Packet::AllocatePayload(size_t size_bytes) { } void Packet::SetPayloadSize(size_t size_bytes) { - RTC_DCHECK_EQ(padding_size_, 0u); + RTC_DCHECK_EQ(padding_size_, 0); RTC_DCHECK_LE(size_bytes, payload_size_); payload_size_ = size_bytes; buffer_.SetSize(payload_offset_ + payload_size_); @@ -473,8 +473,8 @@ bool Packet::AllocateExtension(ExtensionType type, if (extension_id == ExtensionManager::kInvalidId) { return false; } - RTC_DCHECK_GT(length, 0u); - RTC_DCHECK_LE(length, 16u); + RTC_DCHECK_GT(length, 0); + RTC_DCHECK_LE(length, 16); size_t num_csrc = data()[0] & 0x0F; size_t extensions_offset = kFixedHeaderSize + (num_csrc * 4) + 4; diff --git a/webrtc/modules/rtp_rtcp/source/rtp_packet_history.cc b/webrtc/modules/rtp_rtcp/source/rtp_packet_history.cc index 0a15209271..c4edc732b8 100644 --- a/webrtc/modules/rtp_rtcp/source/rtp_packet_history.cc +++ b/webrtc/modules/rtp_rtcp/source/rtp_packet_history.cc @@ -45,7 +45,7 @@ void RtpPacketHistory::SetStorePacketsStatus(bool enable, } void RtpPacketHistory::Allocate(size_t number_to_store) { - RTC_DCHECK_GT(number_to_store, 0u); + RTC_DCHECK_GT(number_to_store, 0); RTC_DCHECK_LE(number_to_store, kMaxCapacity); store_ = true; stored_packets_.resize(number_to_store); diff --git a/webrtc/modules/utility/source/audio_frame_operations_unittest.cc b/webrtc/modules/utility/source/audio_frame_operations_unittest.cc index 5842b90c0a..8f83e051ee 100644 --- a/webrtc/modules/utility/source/audio_frame_operations_unittest.cc +++ b/webrtc/modules/utility/source/audio_frame_operations_unittest.cc @@ -53,7 +53,7 @@ void VerifyFramesAreEqual(const AudioFrame& frame1, const AudioFrame& frame2) { void InitFrame(AudioFrame* frame, size_t channels, size_t samples_per_channel, int16_t left_data, int16_t right_data) { RTC_DCHECK(frame); - RTC_DCHECK_GE(2u, channels); + RTC_DCHECK_GE(2, channels); RTC_DCHECK_GE(AudioFrame::kMaxDataSizeSamples, samples_per_channel * channels); frame->samples_per_channel_ = samples_per_channel; diff --git a/webrtc/modules/video_coding/codec_database.cc b/webrtc/modules/video_coding/codec_database.cc index ff7077e569..75e7043509 100644 --- a/webrtc/modules/video_coding/codec_database.cc +++ b/webrtc/modules/video_coding/codec_database.cc @@ -198,7 +198,7 @@ bool VCMCodecDataBase::SetSendCodec(const VideoCodec* send_codec, RTC_DCHECK_GE(number_of_cores, 1); RTC_DCHECK_GE(send_codec->plType, 1); // Make sure the start bit rate is sane... - RTC_DCHECK_LE(send_codec->startBitrate, 1000000u); + RTC_DCHECK_LE(send_codec->startBitrate, 1000000); RTC_DCHECK(send_codec->codecType != kVideoCodecUnknown); bool reset_required = pending_encoder_reset_; if (number_of_cores_ != number_of_cores) { diff --git a/webrtc/modules/video_coding/codecs/vp9/vp9_frame_buffer_pool.cc b/webrtc/modules/video_coding/codecs/vp9/vp9_frame_buffer_pool.cc index b8a2dcd800..c5d2ed9e61 100644 --- a/webrtc/modules/video_coding/codecs/vp9/vp9_frame_buffer_pool.cc +++ b/webrtc/modules/video_coding/codecs/vp9/vp9_frame_buffer_pool.cc @@ -53,7 +53,7 @@ bool Vp9FrameBufferPool::InitializeVpxUsePool( rtc::scoped_refptr Vp9FrameBufferPool::GetFrameBuffer(size_t min_size) { - RTC_DCHECK_GT(min_size, 0u); + RTC_DCHECK_GT(min_size, 0); rtc::scoped_refptr available_buffer = nullptr; { rtc::CritScope cs(&buffers_lock_); diff --git a/webrtc/modules/video_coding/histogram.cc b/webrtc/modules/video_coding/histogram.cc index f2aa6eabb6..f862faf0bb 100644 --- a/webrtc/modules/video_coding/histogram.cc +++ b/webrtc/modules/video_coding/histogram.cc @@ -17,8 +17,8 @@ namespace webrtc { namespace video_coding { Histogram::Histogram(size_t num_buckets, size_t max_num_values) { - RTC_DCHECK_GT(num_buckets, 0u); - RTC_DCHECK_GT(max_num_values, 0u); + RTC_DCHECK_GT(num_buckets, 0); + RTC_DCHECK_GT(max_num_values, 0); buckets_.resize(num_buckets); values_.reserve(max_num_values); index_ = 0; diff --git a/webrtc/modules/video_coding/video_codec_initializer.cc b/webrtc/modules/video_coding/video_codec_initializer.cc index 57f9b268c0..c6db91619b 100644 --- a/webrtc/modules/video_coding/video_codec_initializer.cc +++ b/webrtc/modules/video_coding/video_codec_initializer.cc @@ -177,8 +177,8 @@ VideoCodec VideoCodecInitializer::VideoEncoderConfigToVideoCodec( } for (size_t i = 0; i < streams.size(); ++i) { SimulcastStream* sim_stream = &video_codec.simulcastStream[i]; - RTC_DCHECK_GT(streams[i].width, 0u); - RTC_DCHECK_GT(streams[i].height, 0u); + RTC_DCHECK_GT(streams[i].width, 0); + RTC_DCHECK_GT(streams[i].height, 0); RTC_DCHECK_GT(streams[i].max_framerate, 0); // Different framerates not supported per stream at the moment. RTC_DCHECK_EQ(streams[i].max_framerate, streams[0].max_framerate); diff --git a/webrtc/sdk/objc/Framework/Classes/h264_video_toolbox_nalu.cc b/webrtc/sdk/objc/Framework/Classes/h264_video_toolbox_nalu.cc index 0d7975821f..d48e99066f 100644 --- a/webrtc/sdk/objc/Framework/Classes/h264_video_toolbox_nalu.cc +++ b/webrtc/sdk/objc/Framework/Classes/h264_video_toolbox_nalu.cc @@ -56,7 +56,7 @@ bool H264CMSampleBufferToAnnexBBuffer( return false; } RTC_CHECK_EQ(nalu_header_size, kAvccHeaderByteSize); - RTC_DCHECK_EQ(param_set_count, 2u); + RTC_DCHECK_EQ(param_set_count, 2); // Truncate any previous data in the buffer without changing its capacity. annexb_buffer->SetSize(0); @@ -250,7 +250,7 @@ bool H264AnnexBBufferToCMSampleBuffer(const uint8_t* annexb_buffer, bool H264AnnexBBufferHasVideoFormatDescription(const uint8_t* annexb_buffer, size_t annexb_buffer_size) { RTC_DCHECK(annexb_buffer); - RTC_DCHECK_GT(annexb_buffer_size, 4u); + RTC_DCHECK_GT(annexb_buffer_size, 4); // The buffer we receive via RTP has 00 00 00 01 start code artifically // embedded by the RTP depacketizer. Extract NALU information. diff --git a/webrtc/system_wrappers/include/aligned_array.h b/webrtc/system_wrappers/include/aligned_array.h index a2ffe99c14..71fefea72f 100644 --- a/webrtc/system_wrappers/include/aligned_array.h +++ b/webrtc/system_wrappers/include/aligned_array.h @@ -23,7 +23,7 @@ template class AlignedArray { AlignedArray(size_t rows, size_t cols, size_t alignment) : rows_(rows), cols_(cols) { - RTC_CHECK_GT(alignment, 0u); + RTC_CHECK_GT(alignment, 0); head_row_ = static_cast(AlignedMalloc(rows_ * sizeof(*head_row_), alignment)); for (size_t i = 0; i < rows_; ++i) { diff --git a/webrtc/test/call_test.cc b/webrtc/test/call_test.cc index aaafdb3876..aadcb8d5b8 100644 --- a/webrtc/test/call_test.cc +++ b/webrtc/test/call_test.cc @@ -203,8 +203,8 @@ void CallTest::CreateSendConfig(size_t num_video_streams, size_t num_flexfec_streams, Transport* send_transport) { RTC_DCHECK(num_video_streams <= kNumSsrcs); - RTC_DCHECK_LE(num_audio_streams, 1u); - RTC_DCHECK_LE(num_flexfec_streams, 1u); + RTC_DCHECK_LE(num_audio_streams, 1); + RTC_DCHECK_LE(num_flexfec_streams, 1); RTC_DCHECK(num_audio_streams == 0 || voe_send_.channel_id >= 0); if (num_video_streams > 0) { video_send_config_ = VideoSendStream::Config(send_transport); @@ -261,7 +261,7 @@ void CallTest::CreateMatchingReceiveConfigs(Transport* rtcp_send_transport) { } } - RTC_DCHECK_GE(1u, num_audio_streams_); + RTC_DCHECK_GE(1, num_audio_streams_); if (num_audio_streams_ == 1) { RTC_DCHECK_LE(0, voe_send_.channel_id); AudioReceiveStream::Config audio_config; diff --git a/webrtc/test/frame_generator.cc b/webrtc/test/frame_generator.cc index eeb0b0f9e5..b6307f94c1 100644 --- a/webrtc/test/frame_generator.cc +++ b/webrtc/test/frame_generator.cc @@ -161,7 +161,7 @@ class ScrollingImageFrameGenerator : public FrameGenerator { current_source_frame_(nullptr), file_generator_(files, source_width, source_height, 1) { RTC_DCHECK(clock_ != nullptr); - RTC_DCHECK_GT(num_frames_, 0u); + RTC_DCHECK_GT(num_frames_, 0); RTC_DCHECK_GE(source_height, target_height); RTC_DCHECK_GE(source_width, target_width); RTC_DCHECK_GE(scroll_time_ms, 0); diff --git a/webrtc/video/end_to_end_tests.cc b/webrtc/video/end_to_end_tests.cc index cf8d5d099f..86c181bdf4 100644 --- a/webrtc/video/end_to_end_tests.cc +++ b/webrtc/video/end_to_end_tests.cc @@ -1039,7 +1039,7 @@ void EndToEndTest::DecodesRetransmittedFrame(bool enable_rtx, bool enable_red) { } // Configure encoding and decoding with VP8, since generic packetization // doesn't support FEC with NACK. - RTC_DCHECK_EQ(1u, (*receive_configs)[0].decoders.size()); + RTC_DCHECK_EQ(1, (*receive_configs)[0].decoders.size()); send_config->encoder_settings.encoder = encoder_.get(); send_config->encoder_settings.payload_name = "VP8"; (*receive_configs)[0].decoders[0].payload_name = "VP8"; @@ -2657,7 +2657,7 @@ TEST_P(EndToEndTest, ReportsSetEncoderRates) { std::vector* receive_configs, VideoEncoderConfig* encoder_config) override { send_config->encoder_settings.encoder = this; - RTC_DCHECK_EQ(1u, encoder_config->number_of_streams); + RTC_DCHECK_EQ(1, encoder_config->number_of_streams); } int32_t SetRateAllocation(const BitrateAllocation& rate_allocation, @@ -3238,7 +3238,7 @@ void EndToEndTest::TestRtpStatePreservation(bool use_rtx, if (encoder_config.number_of_streams > 1) { // Lower bitrates so that all streams send initially. - RTC_DCHECK_EQ(3u, encoder_config.number_of_streams); + RTC_DCHECK_EQ(3, encoder_config.number_of_streams); for (size_t i = 0; i < encoder_config.number_of_streams; ++i) { streams[i].min_bitrate_bps = 10000; streams[i].target_bitrate_bps = 15000; diff --git a/webrtc/video/video_quality_test.cc b/webrtc/video/video_quality_test.cc index f7a63aea41..8f5cb367e2 100644 --- a/webrtc/video/video_quality_test.cc +++ b/webrtc/video/video_quality_test.cc @@ -157,7 +157,7 @@ class VideoAnalyzer : public PacketReceiver, // spare cores. uint32_t num_cores = CpuInfo::DetectNumberOfCores(); - RTC_DCHECK_GE(num_cores, 1u); + RTC_DCHECK_GE(num_cores, 1); static const uint32_t kMinCoresLeft = 4; static const uint32_t kMaxComparisonThreads = 8; @@ -757,7 +757,7 @@ class VideoAnalyzer : public PacketReceiver, void AddCapturedFrameForComparison(const VideoFrame& video_frame) { rtc::CritScope lock(&crit_); - RTC_DCHECK_EQ(0u, video_frame.timestamp()); + RTC_DCHECK_EQ(0, video_frame.timestamp()); // Frames from the capturer does not have a rtp timestamp. Create one so it // can be used for comparison. VideoFrame copy = video_frame; @@ -891,7 +891,7 @@ void VideoQualityTest::CheckParams() { if (params_.video.codec == "VP8") { RTC_CHECK_EQ(params_.ss.num_spatial_layers, 1); } else if (params_.video.codec == "VP9") { - RTC_CHECK_EQ(params_.ss.streams.size(), 1u); + RTC_CHECK_EQ(params_.ss.streams.size(), 1); } } diff --git a/webrtc/video/video_send_stream.cc b/webrtc/video/video_send_stream.cc index 331f009287..0821059801 100644 --- a/webrtc/video/video_send_stream.cc +++ b/webrtc/video/video_send_stream.cc @@ -50,7 +50,7 @@ std::vector CreateRtpRtcpModules( RtcEventLog* event_log, RateLimiter* retransmission_rate_limiter, size_t num_modules) { - RTC_DCHECK_GT(num_modules, 0u); + RTC_DCHECK_GT(num_modules, 0); RtpRtcp::Configuration configuration; ReceiveStatistics* null_receive_statistics = configuration.receive_statistics; configuration.audio = false; diff --git a/webrtc/video/video_send_stream_tests.cc b/webrtc/video/video_send_stream_tests.cc index 4412f4eaa5..359a01385a 100644 --- a/webrtc/video/video_send_stream_tests.cc +++ b/webrtc/video/video_send_stream_tests.cc @@ -1110,7 +1110,7 @@ TEST_F(VideoSendStreamTest, SuspendBelowMinBitrate) { VideoSendStream::Config* send_config, std::vector* receive_configs, VideoEncoderConfig* encoder_config) override { - RTC_DCHECK_EQ(1u, encoder_config->number_of_streams); + RTC_DCHECK_EQ(1, encoder_config->number_of_streams); transport_adapter_.reset( new internal::TransportAdapter(send_config->send_transport)); transport_adapter_->Enable(); @@ -1554,7 +1554,7 @@ class MaxPaddingSetTest : public test::SendTest { VideoSendStream::Config* send_config, std::vector* receive_configs, VideoEncoderConfig* encoder_config) override { - RTC_DCHECK_EQ(1u, encoder_config->number_of_streams); + RTC_DCHECK_EQ(1, encoder_config->number_of_streams); if (running_without_padding_) { encoder_config->min_transmit_bitrate_bps = 0; encoder_config->content_type = diff --git a/webrtc/voice_engine/test/auto_test/fakes/loudest_filter.cc b/webrtc/voice_engine/test/auto_test/fakes/loudest_filter.cc index 1787915356..09ca1274c2 100644 --- a/webrtc/voice_engine/test/auto_test/fakes/loudest_filter.cc +++ b/webrtc/voice_engine/test/auto_test/fakes/loudest_filter.cc @@ -67,7 +67,7 @@ bool LoudestFilter::ForwardThisPacket(const webrtc::RTPHeader& rtp_header) { } unsigned int quietest_ssrc = FindQuietestStream(); - RTC_CHECK_NE(0u, quietest_ssrc); + RTC_CHECK_NE(0, quietest_ssrc); // A smaller value if audio level corresponds to a louder sound. if (audio_level < stream_levels_[quietest_ssrc].audio_level) { stream_levels_.erase(quietest_ssrc); diff --git a/webrtc/voice_engine/utility.cc b/webrtc/voice_engine/utility.cc index 37e12cea4f..88c60fdc8d 100644 --- a/webrtc/voice_engine/utility.cc +++ b/webrtc/voice_engine/utility.cc @@ -82,10 +82,10 @@ void MixWithSat(int16_t target[], const int16_t source[], size_t source_channel, size_t source_len) { - RTC_DCHECK_GE(target_channel, 1u); - RTC_DCHECK_LE(target_channel, 2u); - RTC_DCHECK_GE(source_channel, 1u); - RTC_DCHECK_LE(source_channel, 2u); + RTC_DCHECK_GE(target_channel, 1); + RTC_DCHECK_LE(target_channel, 2); + RTC_DCHECK_GE(source_channel, 1); + RTC_DCHECK_LE(source_channel, 2); if (target_channel == 2 && source_channel == 1) { // Convert source from mono to stereo. diff --git a/webrtc/voice_engine/voe_base_impl.cc b/webrtc/voice_engine/voe_base_impl.cc index bac9dcadbf..fecb16a325 100644 --- a/webrtc/voice_engine/voe_base_impl.cc +++ b/webrtc/voice_engine/voe_base_impl.cc @@ -535,7 +535,7 @@ int VoEBaseImpl::GetVersion(char version[1024]) { } std::string versionString = VoiceEngine::GetVersionString(); - RTC_DCHECK_GT(1024u, versionString.size() + 1); + RTC_DCHECK_GT(1024, versionString.size() + 1); char* end = std::copy(versionString.cbegin(), versionString.cend(), version); end[0] = '\n'; end[1] = '\0';