kwiberg
8a44e1d87b
Let RTC_[D]CHECK_op accept arguments of different signedness
...
With this change, instead of
RTC_DCHECK_GE(unsigned_var, 17u);
we can simply write
RTC_DCHECK_GE(unsigned_var, 17);
or even
RTC_DCHECK_GE(unsigned_var, -17); // Always true.
and the mathematically sensible thing will happen.
Perhaps more importantly, we can replace checks like
// index is size_t, num_channels is int.
RTC_DCHECK(num_channels >= 0
&& index < static_cast<size_t>(num_channels));
or, even worse, just
// Surely num_channels isn't negative. That would be absurd!
RTC_DCHECK_LT(index, static_cast<size_t>(num_channels));
with simply
RTC_DCHECK_LT(index, num_channels);
In short, you no longer have to keep track of the signedness of the arguments, because the sensible thing will happen.
BUG=webrtc:6645
Review-Url: https://codereview.webrtc.org/2459793002
Cr-Commit-Position: refs/heads/master@{#14878}
2016-11-01 19:04:32 +00:00
..
2016-10-04 16:33:33 +00:00
2016-10-24 15:25:33 +00:00
2016-10-01 05:29:53 +00:00
2016-10-05 09:27:48 +00:00
2015-08-24 21:52:45 +00:00
2015-09-16 12:37:52 +00:00
2016-09-29 00:42:08 +00:00
2016-09-29 00:42:08 +00:00
2016-05-31 13:28:09 +00:00
2016-10-07 05:07:36 +00:00
2016-10-21 08:53:01 +00:00
2016-09-29 00:42:08 +00:00
2016-05-10 17:56:10 +00:00
2015-09-16 12:37:52 +00:00
2016-09-29 00:42:08 +00:00
2016-05-10 17:56:10 +00:00
2016-05-10 17:56:10 +00:00
2016-09-29 00:42:08 +00:00
2016-05-10 17:56:10 +00:00
2016-02-14 17:28:39 +00:00
2016-09-29 00:42:08 +00:00
2015-08-24 21:52:45 +00:00
2015-09-16 12:37:52 +00:00
2016-10-01 05:29:53 +00:00
2016-10-24 15:25:33 +00:00
2016-10-24 15:25:33 +00:00
2016-05-02 08:50:34 +00:00
2016-05-02 08:50:34 +00:00
2016-10-18 11:06:19 +00:00
2016-10-18 11:06:19 +00:00
2016-10-18 11:06:19 +00:00
2016-10-18 11:06:19 +00:00
2016-10-01 05:29:53 +00:00
2016-10-18 11:06:19 +00:00
2016-10-18 11:06:19 +00:00
2016-10-24 15:25:33 +00:00
2016-10-24 15:25:33 +00:00
2016-10-04 16:33:33 +00:00
2016-10-01 05:29:53 +00:00
2016-10-13 10:35:58 +00:00
2016-10-13 10:35:58 +00:00
2016-09-29 00:42:08 +00:00
2016-06-22 16:07:07 +00:00
2016-05-01 21:53:55 +00:00
2016-10-01 05:29:53 +00:00
2016-05-10 17:56:10 +00:00
2016-05-10 17:56:10 +00:00
2016-10-11 11:35:40 +00:00
2016-10-11 11:35:40 +00:00
2015-09-16 12:37:52 +00:00
2016-10-11 11:35:40 +00:00
2016-11-01 19:04:32 +00:00
2016-10-11 11:35:40 +00:00
2016-10-01 05:29:53 +00:00
2016-05-10 17:56:10 +00:00
2016-05-10 12:54:43 +00:00
2016-10-01 05:29:53 +00:00
2016-05-10 17:56:10 +00:00
2016-05-02 11:46:19 +00:00
2016-10-01 05:29:53 +00:00
2016-06-08 13:43:49 +00:00
2016-06-08 13:43:49 +00:00
2016-10-04 16:33:33 +00:00
2016-10-24 15:25:33 +00:00
2016-10-24 15:25:33 +00:00
2016-10-04 16:33:33 +00:00
2016-10-01 05:29:53 +00:00
2016-10-01 05:29:53 +00:00
2016-08-22 16:48:11 +00:00
2016-10-13 10:35:58 +00:00
2015-12-16 15:36:10 +00:00
2016-05-25 14:37:47 +00:00
2016-09-22 09:07:03 +00:00
2016-10-01 05:29:53 +00:00
2016-08-26 06:53:43 +00:00
2015-09-16 12:37:52 +00:00
2015-06-29 11:54:50 +00:00
2016-10-24 15:25:33 +00:00
2016-10-24 15:25:33 +00:00
2016-10-24 15:25:33 +00:00
2016-10-24 15:25:33 +00:00
2016-10-24 15:25:33 +00:00
2016-09-29 00:42:08 +00:00
2015-08-24 21:52:45 +00:00
2015-09-16 12:37:52 +00:00
2015-08-24 21:52:45 +00:00
2015-09-16 12:37:52 +00:00
2016-09-29 00:42:08 +00:00
2015-09-16 12:37:52 +00:00
2016-10-24 15:25:33 +00:00
2016-10-24 15:25:33 +00:00
2016-09-22 09:07:03 +00:00
2016-10-31 15:59:34 +00:00
2016-10-31 15:59:34 +00:00
2016-10-13 10:35:58 +00:00
2015-10-29 10:31:11 +00:00
2016-09-29 00:42:08 +00:00
2016-03-29 23:42:12 +00:00
2016-04-06 08:03:07 +00:00
2016-09-29 00:42:08 +00:00
2016-04-22 20:21:49 +00:00
2016-04-22 20:21:49 +00:00
2016-10-01 05:29:53 +00:00
2016-05-02 08:50:34 +00:00
2015-09-16 12:37:52 +00:00
2016-10-24 15:25:33 +00:00
2016-10-24 15:25:33 +00:00
2015-09-16 12:37:52 +00:00