kwiberg
0703856b53
Add SafeClamp(), which accepts args of different types
...
Specifically, just like SafeMin() and SafeMax() it handles all
combinations of integer and all
combinations of floating-point arguments by picking a
result type that is guaranteed to be able to hold the result.
This CL also replaces a bunch of std::min + std:max call pairs with
calls to SafeClamp()---the ones that could easily be found by grep
because "min" and "max" were on the same line. :-)
BUG=webrtc:7459
Review-Url: https://codereview.webrtc.org/2808513003
Cr-Commit-Position: refs/heads/master@{#18542}
2017-06-12 18:40:47 +00:00
..
2017-04-05 21:18:07 +00:00
2017-06-12 18:40:47 +00:00
2017-05-03 13:45:44 +00:00
2017-05-03 13:45:44 +00:00
2017-05-03 13:45:44 +00:00
2017-05-03 13:45:44 +00:00
2017-02-23 13:16:26 +00:00
2017-02-23 13:16:26 +00:00
2017-02-23 13:16:26 +00:00
2017-05-23 11:07:10 +00:00
2017-04-19 16:03:40 +00:00
2017-04-19 16:03:40 +00:00
2017-02-23 13:16:26 +00:00
2017-01-03 12:20:34 +00:00
2017-02-23 13:16:26 +00:00
2017-03-01 06:08:53 +00:00
2017-03-01 06:08:53 +00:00
2017-03-01 06:08:53 +00:00
2017-04-05 21:18:07 +00:00
2017-04-06 23:33:06 +00:00
2017-04-05 21:18:07 +00:00
2017-01-03 12:20:34 +00:00
2017-02-27 03:53:40 +00:00
2017-01-03 12:20:34 +00:00
2017-02-23 13:16:26 +00:00
2017-04-06 22:45:32 +00:00
2017-02-23 13:16:26 +00:00
2017-04-05 21:18:07 +00:00
2017-04-05 21:18:07 +00:00
2017-04-05 21:18:07 +00:00
2017-04-05 21:18:07 +00:00
2017-04-05 21:18:07 +00:00
2017-04-05 21:18:07 +00:00
2017-04-10 11:18:38 +00:00
2017-04-05 21:18:07 +00:00
2017-04-05 21:18:07 +00:00
2017-04-05 21:18:07 +00:00
2017-04-05 21:18:07 +00:00
2017-02-23 13:16:26 +00:00
2017-02-23 13:16:26 +00:00
2017-02-23 13:16:26 +00:00
2017-03-01 06:08:53 +00:00
2017-06-12 18:40:47 +00:00
2017-03-01 06:08:53 +00:00
2017-04-05 21:18:07 +00:00
2017-05-23 11:07:10 +00:00
2017-04-05 21:18:07 +00:00
2017-02-23 13:16:26 +00:00
2017-02-23 13:16:26 +00:00
2017-02-23 13:16:26 +00:00
2017-05-23 11:07:10 +00:00
2017-06-12 18:40:47 +00:00
2017-02-23 13:16:26 +00:00
2017-02-23 13:16:26 +00:00
2017-02-23 13:16:26 +00:00
2017-02-23 13:16:26 +00:00
2017-02-23 13:16:26 +00:00
2017-02-23 13:16:26 +00:00
2017-06-12 18:40:47 +00:00
2017-05-03 12:39:09 +00:00
2017-04-05 21:18:07 +00:00
2017-02-23 13:16:26 +00:00
2017-04-05 21:18:07 +00:00
2017-04-05 21:18:07 +00:00
2017-05-03 13:45:44 +00:00
2017-05-03 13:45:44 +00:00
2017-05-03 13:45:44 +00:00
2017-04-06 22:45:32 +00:00
2017-04-06 22:45:32 +00:00
2017-04-06 22:45:32 +00:00
2017-04-05 21:18:07 +00:00
2017-04-06 05:06:36 +00:00
2017-04-05 21:18:07 +00:00
2017-04-05 21:18:07 +00:00
2017-05-03 12:39:09 +00:00
2017-04-05 21:18:07 +00:00
2017-03-01 06:08:53 +00:00
2017-04-06 22:45:32 +00:00
2017-03-01 06:08:53 +00:00
2017-04-05 21:18:07 +00:00
2017-04-06 22:45:32 +00:00
2017-04-05 21:18:07 +00:00
2017-04-06 22:45:32 +00:00
2017-04-05 21:18:07 +00:00
2017-04-06 22:45:32 +00:00
2017-04-06 22:45:32 +00:00
2017-04-19 16:03:40 +00:00
2017-04-19 16:03:40 +00:00
2017-06-12 18:40:47 +00:00
2017-05-03 12:39:09 +00:00
2017-05-03 12:39:09 +00:00
2017-04-06 22:45:32 +00:00
2017-04-06 22:45:32 +00:00
2017-06-12 18:40:47 +00:00
2017-04-06 22:45:32 +00:00
2017-04-06 22:45:32 +00:00
2017-06-12 18:40:47 +00:00
2017-04-06 22:45:32 +00:00
2017-05-23 11:07:10 +00:00
2017-05-23 11:07:10 +00:00
2017-05-23 11:07:10 +00:00
2017-05-03 13:45:44 +00:00
2017-05-03 13:45:44 +00:00