Cleanup: Using DCHECK comparison macros for unit types.

This provides nicer error messages.

Bug: webrtc:9883
Change-Id: I7664c12f34bec2ba46a4057b1f45958daf3944b8
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/132707
Reviewed-by: Åsa Persson <asapersson@webrtc.org>
Commit-Queue: Sebastian Jansson <srte@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#27590}
This commit is contained in:
Sebastian Jansson
2019-04-12 11:21:32 +02:00
committed by Commit Bot
parent e8cbf30231
commit 5a000165d2
6 changed files with 7 additions and 7 deletions

View File

@ -265,7 +265,7 @@ class SimulatedClockWithFrames : public SimulatedClock {
bool frame_injected = false;
while (!timestamps_.empty() &&
timestamps_.front().arrive_time <= end_time) {
RTC_DCHECK(timestamps_.front().arrive_time >= start_time);
RTC_DCHECK_GE(timestamps_.front().arrive_time, start_time);
SimulatedClock::AdvanceTimeMicroseconds(timestamps_.front().arrive_time -
TimeInMicroseconds());
@ -293,7 +293,7 @@ class SimulatedClockWithFrames : public SimulatedClock {
size_t size) {
int64_t previous_arrive_timestamp = 0;
for (size_t i = 0; i < size; i++) {
RTC_CHECK(arrive_timestamps[i] >= previous_arrive_timestamp);
RTC_CHECK_GE(arrive_timestamps[i], previous_arrive_timestamp);
timestamps_.push(TimestampPair(arrive_timestamps[i] * 1000,
render_timestamps[i] * 1000));
previous_arrive_timestamp = arrive_timestamps[i];