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

Issue 1432553007: Rename Maybe to Optional (Closed)

Created:
5 years, 1 month ago by kwiberg-webrtc
Modified:
5 years, 1 month ago
CC:
webrtc-reviews_webrtc.org, interface-changes_webrtc.org, rwolff_gocast.it, yujie_mao (webrtc), Andrew MacDonald, hlundin-webrtc, tlegrand-webrtc, tterriberry_mozilla.com, qiang.lu, niklas.enbom, peah-webrtc, the sun, aluebs-webrtc, bjornv1
Base URL:
https://chromium.googlesource.com/external/webrtc.git@master
Target Ref:
refs/pending/heads/master
Project:
webrtc
Visibility:
Public.

Description

Rename Maybe to Optional And add examples of good and bad usage to the documentation. R=aluebs@webrtc.org, henrik.lundin@webrtc.org, pthatcher@webrtc.org Committed: https://crrev.com/be57983f4bd875c39a229bab5112b32dad004057 Cr-Commit-Position: refs/heads/master@{#10588}

Patch Set 1 : Rename #

Patch Set 2 : Good and bad usage examples #

Patch Set 3 : a -> an #

Total comments: 6

Patch Set 4 : rebase #

Unified diffs Side-by-side diffs Delta from patch set Stats (+397 lines, -950 lines) Patch
M talk/app/webrtc/localaudiosource.cc View 2 chunks +2 lines, -2 lines 0 comments Download
M talk/app/webrtc/localaudiosource_unittest.cc View 5 chunks +12 lines, -12 lines 0 comments Download
M talk/app/webrtc/videosource.cc View 1 chunk +2 lines, -2 lines 0 comments Download
M talk/app/webrtc/videosource_unittest.cc View 7 chunks +12 lines, -8 lines 0 comments Download
M talk/app/webrtc/webrtcsession.cc View 6 chunks +9 lines, -9 lines 0 comments Download
M talk/app/webrtc/webrtcsession_unittest.cc View 4 chunks +7 lines, -7 lines 0 comments Download
M talk/media/base/mediachannel.h View 4 chunks +47 lines, -47 lines 0 comments Download
M talk/media/base/videoengine_unittest.h View 5 chunks +7 lines, -7 lines 0 comments Download
M talk/media/webrtc/webrtcvideoengine2.h View 3 chunks +4 lines, -4 lines 0 comments Download
M talk/media/webrtc/webrtcvideoengine2.cc View 1 2 3 5 chunks +8 lines, -8 lines 0 comments Download
M talk/media/webrtc/webrtcvideoengine2_unittest.cc View 8 chunks +12 lines, -10 lines 0 comments Download
M talk/media/webrtc/webrtcvoiceengine.h View 1 chunk +3 lines, -3 lines 0 comments Download
M talk/media/webrtc/webrtcvoiceengine.cc View 7 chunks +25 lines, -25 lines 0 comments Download
M talk/media/webrtc/webrtcvoiceengine_unittest.cc View 18 chunks +48 lines, -45 lines 0 comments Download
M talk/session/media/channel.cc View 2 chunks +2 lines, -2 lines 0 comments Download
M webrtc/base/BUILD.gn View 1 chunk +1 line, -1 line 0 comments Download
M webrtc/base/base.gyp View 1 chunk +1 line, -1 line 0 comments Download
M webrtc/base/base_tests.gyp View 1 chunk +1 line, -1 line 0 comments Download
D webrtc/base/maybe.h View 1 chunk +0 lines, -110 lines 0 comments Download
D webrtc/base/maybe_unittest.cc View 1 chunk +0 lines, -489 lines 0 comments Download
A + webrtc/base/optional.h View 1 2 4 chunks +48 lines, -18 lines 0 comments Download
A + webrtc/base/optional_unittest.cc View 21 chunks +66 lines, -66 lines 0 comments Download
M webrtc/modules/audio_coding/main/acm2/acm_receiver.cc View 1 chunk +2 lines, -2 lines 0 comments Download
M webrtc/modules/audio_coding/main/acm2/audio_coding_module.cc View 2 chunks +5 lines, -4 lines 0 comments Download
M webrtc/modules/audio_coding/main/acm2/audio_coding_module_impl.h View 1 chunk +1 line, -1 line 0 comments Download
M webrtc/modules/audio_coding/main/acm2/audio_coding_module_impl.cc View 1 chunk +1 line, -1 line 0 comments Download
M webrtc/modules/audio_coding/main/acm2/codec_manager.h View 1 2 3 2 chunks +2 lines, -2 lines 0 comments Download
M webrtc/modules/audio_coding/main/acm2/codec_manager.cc View 1 2 3 2 chunks +3 lines, -3 lines 0 comments Download
M webrtc/modules/audio_coding/main/acm2/rent_a_codec.h View 1 2 3 3 chunks +20 lines, -19 lines 0 comments Download
M webrtc/modules/audio_coding/main/acm2/rent_a_codec.cc View 1 2 3 4 chunks +24 lines, -21 lines 0 comments Download
M webrtc/modules/audio_coding/main/include/audio_coding_module.h View 2 chunks +2 lines, -2 lines 0 comments Download
M webrtc/modules/audio_coding/main/test/APITest.cc View 1 chunk +1 line, -1 line 0 comments Download
M webrtc/modules/audio_processing/beamformer/array_util.h View 2 chunks +5 lines, -4 lines 0 comments Download
M webrtc/modules/audio_processing/beamformer/array_util.cc View 3 chunks +13 lines, -12 lines 0 comments Download
M webrtc/modules/audio_processing/beamformer/nonlinear_beamformer.h View 1 chunk +1 line, -1 line 0 comments Download

Messages

Total messages: 18 (3 generated)
kwiberg-webrtc
pthatcher: talk/ and webrtc/base/ aluebs: webrtc/modules/audio_processing/ hlundin: webrtc/modules/audio_coding/ And everyone's opinion on the doc additions ...
5 years, 1 month ago (2015-11-10 09:32:42 UTC) #3
hlundin-webrtc
webrtc/modules/audio_coding/ and doc text: lgtm
5 years, 1 month ago (2015-11-10 09:59:51 UTC) #4
aluebs-webrtc
modules/audio_processing and doc lgtm
5 years, 1 month ago (2015-11-10 17:15:26 UTC) #5
pthatcher1
lgtm to the renaming, but I do worry about the settability of Maybe/Optional as compared ...
5 years, 1 month ago (2015-11-10 19:07:53 UTC) #6
noahric
https://codereview.webrtc.org/1432553007/diff/40001/webrtc/base/optional.h File webrtc/base/optional.h (right): https://codereview.webrtc.org/1432553007/diff/40001/webrtc/base/optional.h#newcode70 webrtc/base/optional.h:70: : value_(static_cast<T&&>(val)), has_value_(true) {} Ditto. I was just updating ...
5 years, 1 month ago (2015-11-10 19:29:56 UTC) #8
kwiberg-webrtc
https://codereview.webrtc.org/1432553007/diff/40001/webrtc/base/optional.h File webrtc/base/optional.h (right): https://codereview.webrtc.org/1432553007/diff/40001/webrtc/base/optional.h#newcode70 webrtc/base/optional.h:70: : value_(static_cast<T&&>(val)), has_value_(true) {} On 2015/11/10 19:07:53, pthatcher1 wrote: ...
5 years, 1 month ago (2015-11-10 19:36:17 UTC) #9
pthatcher1
https://codereview.webrtc.org/1432553007/diff/40001/webrtc/base/optional.h File webrtc/base/optional.h (right): https://codereview.webrtc.org/1432553007/diff/40001/webrtc/base/optional.h#newcode70 webrtc/base/optional.h:70: : value_(static_cast<T&&>(val)), has_value_(true) {} On 2015/11/10 19:36:17, kwiberg-webrtc wrote: ...
5 years, 1 month ago (2015-11-10 20:21:38 UTC) #10
kwiberg-webrtc
https://codereview.webrtc.org/1432553007/diff/40001/webrtc/base/optional.h File webrtc/base/optional.h (right): https://codereview.webrtc.org/1432553007/diff/40001/webrtc/base/optional.h#newcode70 webrtc/base/optional.h:70: : value_(static_cast<T&&>(val)), has_value_(true) {} On 2015/11/10 19:29:56, noahric wrote: ...
5 years, 1 month ago (2015-11-10 20:33:10 UTC) #11
kwiberg-webrtc
https://codereview.webrtc.org/1432553007/diff/40001/webrtc/base/optional.h File webrtc/base/optional.h (right): https://codereview.webrtc.org/1432553007/diff/40001/webrtc/base/optional.h#newcode70 webrtc/base/optional.h:70: : value_(static_cast<T&&>(val)), has_value_(true) {} On 2015/11/10 20:21:38, pthatcher1 wrote: ...
5 years, 1 month ago (2015-11-10 21:31:31 UTC) #12
kwiberg-webrtc
Committed patchset #4 (id:60001) manually as be57983f4bd875c39a229bab5112b32dad004057 (presubmit successful).
5 years, 1 month ago (2015-11-10 21:34:40 UTC) #13
commit-bot: I haz the power
Patchset 4 (id:??) landed as https://crrev.com/be57983f4bd875c39a229bab5112b32dad004057 Cr-Commit-Position: refs/heads/master@{#10588}
5 years, 1 month ago (2015-11-10 21:34:43 UTC) #14
noahric
To wax philosophical for a minute: I think the terms compatible/incompatible here are a misnomer. ...
5 years, 1 month ago (2015-11-10 22:17:05 UTC) #15
kwiberg-webrtc
On 2015/11/10 22:17:05, noahric wrote: > To wax philosophical for a minute: > > I ...
5 years, 1 month ago (2015-11-11 00:59:46 UTC) #16
noahric
(const reference) Yup, that's basically what I was thinking. Though the compilation error for that ...
5 years, 1 month ago (2015-11-11 01:08:17 UTC) #17
kwiberg-webrtc
5 years, 1 month ago (2015-11-11 01:49:30 UTC) #18
Message was sent while issue was closed.
On 2015/11/11 01:08:17, noahric wrote:
> A reasonable counterargument to all that would be "be a better programmer",
and
> I have no answer for that :)

You're in a better position than I to see what about Optional is difficult to
learn, so that's valuable evidence.

Powered by Google App Engine
This is Rietveld 408576698