commit | 02b9ef6f7e628183b867e1b47c8a8690d5db8b81 | [log] [tgz] |
---|---|---|
author | jschuh <jschuh@chromium.org> | Thu Sep 17 10:04:28 2015 +0900 |
committer | Qijiang Fan <fqj@google.com> | Thu Jun 04 19:41:27 2020 +0900 |
tree | f69b452863515c31ddc7668780bf872260e4c2a8 | |
parent | 3cd7d0ceb05faa0c2e2f8fb2e09579d02ef1a555 [diff] |
Implement CheckedNumeric::UnsignedAbs() This covers some corner cases where we want an equivalent to std::abs() for signed integers, but we want it to convert to an unsigned type of the same width and properly handle the value of signed min(). Review URL: https://codereview.chromium.org/1346753002 Cr-Commit-Position: refs/heads/master@{#349300} CrOS-Libchrome-Original-Commit: eaf375f8db272522afff267fe92fa6b27012a78f