RTC_[D]CHECK_op: Remove "u" suffix on integer constants
There's no longer any need to make the two arguments have the same
signedness, so we can drop the "u" suffix on literal integer
arguments.
NOPRESUBMIT=true
BUG=webrtc:6645
Review-Url: https://codereview.webrtc.org/2535593002
Cr-Commit-Position: refs/heads/master@{#15280}
diff --git a/webrtc/modules/audio_coding/acm2/audio_coding_module.cc b/webrtc/modules/audio_coding/acm2/audio_coding_module.cc
index ee1034b..dd02964 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 @@
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 d8dcd79..afeefc7 100644
--- a/webrtc/modules/audio_coding/acm2/codec_manager.cc
+++ b/webrtc/modules/audio_coding/acm2/codec_manager.cc
@@ -211,7 +211,7 @@
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 d2edcb5..b162941 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 @@
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 483311b..b1d259e 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 @@
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<ParseResult> ParsePayload(rtc::Buffer&& payload,
@@ -44,7 +44,7 @@
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<ParseResult> 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 354f819..a0fc02b 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 @@
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<EncodedAudioFrame> 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 e9772f6..1dc312f 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::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 54529ad..8e59f49 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 @@
// Returns a vector with the n evenly-spaced numbers a, a + (b - a)/(n - 1),
// ..., b.
std::vector<double> 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<double> 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 43d2dac..692e212 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 @@
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 37fa55a..07db78c 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 @@
// 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 10535e2..5763572 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 @@
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 62cb2ec..f978793 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::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 4ccf4fb..f390f53 100644
--- a/webrtc/modules/audio_coding/neteq/test/RTPencode.cc
+++ b/webrtc/modules/audio_coding/neteq/test/RTPencode.cc
@@ -1724,7 +1724,7 @@
#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 c89200b..263f7b4 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 @@
// 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 29beed5..2e452e1 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 @@
// 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<uint32_t>::ReadLittleEndian(encoded);
uint32_t samples_to_decode =
@@ -66,7 +66,7 @@
ByteReader<uint32_t>::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 @@
size_t samples,
size_t original_payload_size_bytes,
rtc::ArrayView<uint8_t> encoded) {
- RTC_CHECK_GE(encoded.size(), 12u);
+ RTC_CHECK_GE(encoded.size(), 12);
ByteWriter<uint32_t>::WriteLittleEndian(&encoded[0], timestamp);
ByteWriter<uint32_t>::WriteLittleEndian(&encoded[4],
rtc::checked_cast<uint32_t>(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 c9163a1..dd10649 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 @@
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<int>(packet_->header.header.payloadType)
<< " is forbidden.";