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

Issue 2916083003: SafeMin/SafeMax: Fix wrong return type when given two enum arguments (Closed)

Created:
3 years, 6 months ago by kwiberg-webrtc
Modified:
3 years, 6 months ago
Reviewers:
ossu
CC:
webrtc-reviews_webrtc.org, tterriberry_mozilla.com
Target Ref:
refs/heads/master
Project:
webrtc
Visibility:
Public.

Description

SafeMin/SafeMax: Fix wrong return type when given two enum arguments And add tests that catch it. BUG=webrtc:7459 Review-Url: https://codereview.webrtc.org/2916083003 Cr-Commit-Position: refs/heads/master@{#18407} Committed: https://chromium.googlesource.com/external/webrtc/+/dbb497af84ada677a4efbba79c823762b274e570

Patch Set 1 #

Total comments: 1
Unified diffs Side-by-side diffs Delta from patch set Stats (+29 lines, -18 lines) Patch
M webrtc/base/safe_minmax.h View 2 chunks +18 lines, -14 lines 0 comments Download
M webrtc/base/safe_minmax_unittest.cc View 1 chunk +11 lines, -4 lines 1 comment Download

Messages

Total messages: 14 (8 generated)
kwiberg-webrtc
I'm not exactly sure what went wrong, actually, but converting from enums to real integer ...
3 years, 6 months ago (2017-06-02 10:14:03 UTC) #4
ossu
On 2017/06/02 10:14:03, kwiberg-webrtc wrote: > This (line 74) is the test that failed without ...
3 years, 6 months ago (2017-06-02 11:04:25 UTC) #7
ossu
Also lgtm!
3 years, 6 months ago (2017-06-02 11:05:33 UTC) #8
commit-bot: I haz the power
CQ is trying da patch. Follow status at: https://chromium-cq-status.appspot.com/v2/patch-status/codereview.webrtc.org/2916083003/1
3 years, 6 months ago (2017-06-02 11:22:30 UTC) #10
commit-bot: I haz the power
Committed patchset #1 (id:1) as https://chromium.googlesource.com/external/webrtc/+/dbb497af84ada677a4efbba79c823762b274e570
3 years, 6 months ago (2017-06-02 11:24:16 UTC) #13
kwiberg-webrtc
3 years, 6 months ago (2017-06-02 11:24:48 UTC) #14
Message was sent while issue was closed.
On 2017/06/02 11:04:25, ossu wrote:
> On 2017/06/02 10:14:03, kwiberg-webrtc wrote:
> > This (line 74) is the test that failed without the code change in this CL.
> 
> Added a check with an Int8-typed enum and that worked as well, but perhaps
that
> was never a problem?

I don't know---the testing has never been exhaustive (we couldn't write that
many tests by hand). Good to know that it works, though!

Powered by Google App Engine
This is Rietveld 408576698