Commit graph

9 commits

Author SHA1 Message Date
Mirko Bonadei
29921cf097 Revert "Use absl::optional instead or rtc::Optional"
This reverts commit 02a69190e8.

Reason for revert: static initializers increase approval revoked.

Original change's description:
> Reland "Use absl::optional instead or rtc::Optional"
> 
> This reverts commit 28e6a164bf.
> 
> Reason for revert: static initializers increase approved
> 
> Original change's description:
> > Revert "Use absl::optional instead or rtc::Optional"
> > 
> > This reverts commit 7ba9e92fa0.
> > 
> > Reason for revert: Breaks Chromium static initialized regression test.
> > https://ci.chromium.org/p/chromium/builders/luci.chromium.try/android-marshmallow-arm64-rel/5068
> > 
> > Original change's description:
> > > Use absl::optional instead or rtc::Optional
> > > 
> > > BUG: webrtc:9078
> > > Change-Id: I69aedce324d86e8894b81210a2de17c5ef68fd11
> > > Reviewed-on: https://webrtc-review.googlesource.com/77082
> > > Commit-Queue: Danil Chapovalov <danilchap@webrtc.org>
> > > Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
> > > Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
> > > Cr-Commit-Position: refs/heads/master@{#23440}
> > 
> > TBR=danilchap@webrtc.org,mbonadei@webrtc.org,kwiberg@webrtc.org
> > 
> > Change-Id: I09ae74bddc69d0b25c8dfbcacc4ec906b34ca748
> > No-Presubmit: true
> > No-Tree-Checks: true
> > No-Try: true
> > Reviewed-on: https://webrtc-review.googlesource.com/79980
> > Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
> > Commit-Queue: Mirko Bonadei <mbonadei@webrtc.org>
> > Cr-Commit-Position: refs/heads/master@{#23449}
> 
> TBR=danilchap@webrtc.org,mbonadei@webrtc.org,kwiberg@webrtc.org
> 
> Change-Id: I39bcdaa35276c998383edf038802fcc2d42e49c7
> No-Presubmit: true
> No-Tree-Checks: true
> No-Try: true
> Reviewed-on: https://webrtc-review.googlesource.com/80120
> Reviewed-by: Danil Chapovalov <danilchap@webrtc.org>
> Commit-Queue: Danil Chapovalov <danilchap@webrtc.org>
> Cr-Commit-Position: refs/heads/master@{#23460}

TBR=danilchap@webrtc.org,mbonadei@webrtc.org,kwiberg@webrtc.org

Change-Id: Ie6be11b3cd651dc857dccaff1cbda2e1692e5585
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://webrtc-review.googlesource.com/80200
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Commit-Queue: Mirko Bonadei <mbonadei@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#23468}
2018-05-31 11:42:48 +00:00
Danil Chapovalov
02a69190e8 Reland "Use absl::optional instead or rtc::Optional"
This reverts commit 28e6a164bf.

Reason for revert: static initializers increase approved

Original change's description:
> Revert "Use absl::optional instead or rtc::Optional"
> 
> This reverts commit 7ba9e92fa0.
> 
> Reason for revert: Breaks Chromium static initialized regression test.
> https://ci.chromium.org/p/chromium/builders/luci.chromium.try/android-marshmallow-arm64-rel/5068
> 
> Original change's description:
> > Use absl::optional instead or rtc::Optional
> > 
> > BUG: webrtc:9078
> > Change-Id: I69aedce324d86e8894b81210a2de17c5ef68fd11
> > Reviewed-on: https://webrtc-review.googlesource.com/77082
> > Commit-Queue: Danil Chapovalov <danilchap@webrtc.org>
> > Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
> > Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
> > Cr-Commit-Position: refs/heads/master@{#23440}
> 
> TBR=danilchap@webrtc.org,mbonadei@webrtc.org,kwiberg@webrtc.org
> 
> Change-Id: I09ae74bddc69d0b25c8dfbcacc4ec906b34ca748
> No-Presubmit: true
> No-Tree-Checks: true
> No-Try: true
> Reviewed-on: https://webrtc-review.googlesource.com/79980
> Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
> Commit-Queue: Mirko Bonadei <mbonadei@webrtc.org>
> Cr-Commit-Position: refs/heads/master@{#23449}

TBR=danilchap@webrtc.org,mbonadei@webrtc.org,kwiberg@webrtc.org

Change-Id: I39bcdaa35276c998383edf038802fcc2d42e49c7
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://webrtc-review.googlesource.com/80120
Reviewed-by: Danil Chapovalov <danilchap@webrtc.org>
Commit-Queue: Danil Chapovalov <danilchap@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#23460}
2018-05-31 06:39:35 +00:00
Mirko Bonadei
28e6a164bf Revert "Use absl::optional instead or rtc::Optional"
This reverts commit 7ba9e92fa0.

Reason for revert: Breaks Chromium static initialized regression test.
https://ci.chromium.org/p/chromium/builders/luci.chromium.try/android-marshmallow-arm64-rel/5068

Original change's description:
> Use absl::optional instead or rtc::Optional
> 
> BUG: webrtc:9078
> Change-Id: I69aedce324d86e8894b81210a2de17c5ef68fd11
> Reviewed-on: https://webrtc-review.googlesource.com/77082
> Commit-Queue: Danil Chapovalov <danilchap@webrtc.org>
> Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
> Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
> Cr-Commit-Position: refs/heads/master@{#23440}

TBR=danilchap@webrtc.org,mbonadei@webrtc.org,kwiberg@webrtc.org

Change-Id: I09ae74bddc69d0b25c8dfbcacc4ec906b34ca748
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://webrtc-review.googlesource.com/79980
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Commit-Queue: Mirko Bonadei <mbonadei@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#23449}
2018-05-30 14:02:40 +00:00
Danil Chapovalov
7ba9e92fa0 Use absl::optional instead or rtc::Optional
BUG: webrtc:9078
Change-Id: I69aedce324d86e8894b81210a2de17c5ef68fd11
Reviewed-on: https://webrtc-review.googlesource.com/77082
Commit-Queue: Danil Chapovalov <danilchap@webrtc.org>
Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#23440}
2018-05-30 07:51:30 +00:00
Hans Wennborg
bda78c9464 Fix cast of const-qualified types in FunctionThatDoesNothingImpl
Recent Clang versions fixed a bug which had previously allowed some casts that
removed qualifiers to go undiagnosed.

This fixes the following kind of error:

  ./../third_party/webrtc/api/optional.h:41:35: error: reinterpret_cast from
        'const int *' to 'void *' casts away qualifiers
	FunctionThatDoesNothingImpl(reinterpret_cast<void*>(x)));
				    ^~~~~~~~~~~~~~~~~~~~~~~~~~
  ../../third_party/webrtc/api/optional.h:280:45: note: in instantiation of
      function template specialization
      'rtc::optional_internal::FunctionThatDoesNothing<const int>' requested here
      return has_value_ ? *optional_internal::FunctionThatDoesNothing(&value_)
					      ^
  ../../third_party/webrtc/call/rtp_bitrate_configurator.cc:70:53:

        note: in instantiation of member function 'rtc::Optional<int>::value_or'
        requested here
	std::max(bitrate_config_mask_.min_bitrate_bps.value_or(0),
                                                    ^

Bug: chromium:831081
Change-Id: I032ebd1f052fa2a50548e984febb7fa462df42ea
Reviewed-on: https://webrtc-review.googlesource.com/68941
Commit-Queue: Hans Wennborg <hans@chromium.org>
Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#22804}
2018-04-10 11:53:05 +00:00
Danil Chapovalov
57ff2734df Remove rtc::Optional::MoveValue
This function is not present in std::optional
The only use of MoveValue doesn't need move since
copying underneath struct is as correct and as fast as moving

Bug: webrtc:9078
Change-Id: Ic0c87e50ffd8f6c024759b14ceeb8922b5d3a6fd
Reviewed-on: https://webrtc-review.googlesource.com/64986
Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
Commit-Queue: Danil Chapovalov <danilchap@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#22646}
2018-03-28 11:58:06 +00:00
Oskar Sundbom
e403212ede Added nullopt and implicit construction to rtc::Optional
Both of these features are in std::optional and the lack
of them is making Optional use in WebRTC more cumbersome.

We are currently looking at using a more fully-fledged library
for some of our standard utility classes. This is merely a
stop-gap measure.

Bug: None
Change-Id: I958a984fa97a42f6e407be1f38662553efeceac4
Reviewed-on: https://webrtc-review.googlesource.com/22920
Commit-Queue: Oskar Sundbom <ossu@webrtc.org>
Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
Reviewed-by: Danil Chapovalov <danilchap@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#20688}
2017-11-15 15:50:11 +00:00
Mirko Bonadei
92ea95e34a Fixing WebRTC after moving from src/webrtc to src/
In https://webrtc-review.googlesource.com/c/src/+/1560 we moved WebRTC
from src/webrtc to src/ (in order to preserve an healthy git history).
This CL takes care of fixing header guards, #include paths, etc...

NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
TBR=tommi@webrtc.org


Bug: chromium:611808
Change-Id: Iea91618212bee0af16aa3f05071eab8f93706578
Reviewed-on: https://webrtc-review.googlesource.com/1561
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Reviewed-by: Henrik Kjellander <kjellander@webrtc.org>
Commit-Queue: Mirko Bonadei <mbonadei@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#19846}
2017-09-15 05:02:56 +00:00
Mirko Bonadei
bb547203bf Moving src/webrtc into src/.
In order to eliminate the WebRTC Subtree mirror in Chromium, 
WebRTC is moving the content of the src/webrtc directory up
to the src/ directory.

NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
TBR=tommi@webrtc.org

Bug: chromium:611808
Change-Id: Iac59c5b51b950f174119565bac87955a7994bc38
Reviewed-on: https://webrtc-review.googlesource.com/1560
Commit-Queue: Mirko Bonadei <mbonadei@webrtc.org>
Reviewed-by: Henrik Kjellander <kjellander@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#19845}
2017-09-15 04:25:06 +00:00
Renamed from webrtc/api/optional.h (Browse further)