Introcuce RTCError(const T&) constructor.
This CL is spawned from [1] and it introduces RTCError(const T&) in order to remove an unneeded std::move. [1] - https://webrtc-review.googlesource.com/c/src/+/120350 Bug: webrtc:10252 Change-Id: Ibd5aa1c901fd920549e9437908178c786019a328 Reviewed-on: https://webrtc-review.googlesource.com/c/120560 Commit-Queue: Mirko Bonadei <mbonadei@webrtc.org> Reviewed-by: Karl Wiberg <kwiberg@webrtc.org> Cr-Commit-Position: refs/heads/master@{#26468}
This commit is contained in:

committed by
Commit Bot

parent
aa01f27667
commit
9f3a44f515
@ -220,6 +220,7 @@ class RTCErrorOr {
|
||||
// NOTE: Not explicit - we want to use RTCErrorOr<T> as a return type
|
||||
// so it is convenient and sensible to be able to do 'return T()'
|
||||
// when the return type is RTCErrorOr<T>.
|
||||
RTCErrorOr(const T& value) : value_(value) {} // NOLINT
|
||||
RTCErrorOr(T&& value) : value_(std::move(value)) {} // NOLINT
|
||||
|
||||
// Delete the copy constructor and assignment operator; there aren't any use
|
||||
|
@ -6016,7 +6016,7 @@ RTCErrorOr<const cricket::ContentGroup*> PeerConnection::GetEarlyBundleGroup(
|
||||
"has no BUNDLE group");
|
||||
}
|
||||
}
|
||||
return std::move(bundle_group);
|
||||
return bundle_group;
|
||||
}
|
||||
|
||||
RTCError PeerConnection::CreateChannels(const SessionDescription& desc) {
|
||||
|
Reference in New Issue
Block a user