Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(337)

Issue 467103002: Add InRangeCast<> and its test (Closed)

Created:
6 years, 4 months ago by Mark Mentovai
Modified:
6 years, 4 months ago
Reviewers:
Robert Sesek
CC:
crashpad-dev_chromium.org
Base URL:
https://chromium.googlesource.com/crashpad/crashpad@master
Project:
crashpad
Visibility:
Public.

Description

Add InRangeCast<> and its test. InRangeCast<> is similar to base::saturated_cast<>, but it allows the caller to specify the value to be returned in the event that the source value can’t be converted to the destination data type without data loss. TEST=util_test InRangeCast R=rsesek@chromium.org Committed: https://chromium.googlesource.com/crashpad/crashpad/+/6997418cd4af

Patch Set 1 #

Patch Set 2 : Switch from [u]ll constants to correct [U]INT64_C() constants #

Total comments: 2

Patch Set 3 : Rebase #

Unified diffs Side-by-side diffs Delta from patch set Stats (+164 lines, -0 lines) Patch
A util/numeric/in_range_cast.h View 1 chunk +44 lines, -0 lines 0 comments Download
A util/numeric/in_range_cast_test.cc View 1 1 chunk +117 lines, -0 lines 0 comments Download
M util/util.gyp View 1 2 2 chunks +3 lines, -0 lines 0 comments Download

Messages

Total messages: 4 (0 generated)
Mark Mentovai
6 years, 4 months ago (2014-08-13 04:51:28 UTC) #1
Robert Sesek
LGTM https://codereview.chromium.org/467103002/diff/20001/util/util.gyp File util/util.gyp (right): https://codereview.chromium.org/467103002/diff/20001/util/util.gyp#newcode42 util/util.gyp:42: 'numeric/safe_assignment.h', ?
6 years, 4 months ago (2014-08-14 20:35:53 UTC) #2
Mark Mentovai
https://codereview.chromium.org/467103002/diff/20001/util/util.gyp File util/util.gyp (right): https://codereview.chromium.org/467103002/diff/20001/util/util.gyp#newcode42 util/util.gyp:42: 'numeric/safe_assignment.h', On 2014/08/14 20:35:52, rsesek wrote: > ? The ...
6 years, 4 months ago (2014-08-14 23:00:41 UTC) #3
Mark Mentovai
6 years, 4 months ago (2014-08-14 23:00:48 UTC) #4
Message was sent while issue was closed.
Committed patchset #3 manually as 6997418cd4af (presubmit successful).

Powered by Google App Engine
This is Rietveld 408576698