commit | 53b465f2e5c0cba5212b18bf27d21b84378b0c74 | [log] [tgz] |
---|---|---|
author | mukesh agrawal <quiche@google.com> | Fri Sep 23 18:22:13 2016 -0700 |
committer | mukesh agrawal <quiche@google.com> | Tue Oct 04 18:28:01 2016 -0700 |
tree | 8369ca5d9cefe95141548b71eb8e92c8a42284e2 | |
parent | 6154ce7b95f2e77ec3e9c02d48746e592dcdcf54 [diff] |
local_utils: add SAFELY_CLAMP and GetMaxVal Add the SAFELY_CLAMP macro, the SafelyClamp() function template, and the GetMaxVal() function templates. These facilities provide a safe, flexible, expressive way to convert between types. Bug: 31858720 Test: ./runtests.sh (on bullhead) Change-Id: I034066b13a28954cfcd46a470c487136e5d6a51d