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}
This commit is contained in:
kwiberg
2016-11-28 15:21:39 -08:00
committed by Commit bot
parent 80ed35e21c
commit af476c737f
89 changed files with 167 additions and 167 deletions

View File

@ -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;
}

View File

@ -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);

View File

@ -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;

View File

@ -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;

View File

@ -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<uint32_t>::ReadLittleEndian(encoded);
uint32_t samples_to_decode =
@ -66,7 +66,7 @@ int FakeDecodeFromFile::DecodeInternal(const uint8_t* encoded,
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 @@ void FakeDecodeFromFile::PrepareEncoded(uint32_t timestamp,
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));

View File

@ -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<int>(packet_->header.header.payloadType)
<< " is forbidden.";