Commit graph

5 commits

Author SHA1 Message Date
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)