[CodeHealth] Fix use after std::move instances.
The parameter was expanded twice in the macro, leading to double use and move. This is both an example of: * Issue spotted by clandtidy's bug-prone patterns. * Premature optimization. Bug: webrtc:9855 Change-Id: I1a0cb2c99f95c6aec79ba1eb198aa39743ccbcd9 Reviewed-on: https://webrtc-review.googlesource.com/c/119042 Reviewed-by: Steve Anton <steveanton@webrtc.org> Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org> Commit-Queue: Mirko Bonadei <mbonadei@webrtc.org> Cr-Commit-Position: refs/heads/master@{#26367}
This commit is contained in:
parent
e54287a4ae
commit
ae6e0b2058
@ -5237,7 +5237,7 @@ RTCError PeerConnection::PushdownMediaDescription(
|
||||
? channel->SetLocalContent(content_desc, type, &error)
|
||||
: channel->SetRemoteContent(content_desc, type, &error);
|
||||
if (!success) {
|
||||
LOG_AND_RETURN_ERROR(RTCErrorType::INVALID_PARAMETER, std::move(error));
|
||||
LOG_AND_RETURN_ERROR(RTCErrorType::INVALID_PARAMETER, error);
|
||||
}
|
||||
}
|
||||
|
||||
@ -5255,8 +5255,7 @@ RTCError PeerConnection::PushdownMediaDescription(
|
||||
? rtp_data_channel_->SetLocalContent(data_desc, type, &error)
|
||||
: rtp_data_channel_->SetRemoteContent(data_desc, type, &error);
|
||||
if (!success) {
|
||||
LOG_AND_RETURN_ERROR(RTCErrorType::INVALID_PARAMETER,
|
||||
std::move(error));
|
||||
LOG_AND_RETURN_ERROR(RTCErrorType::INVALID_PARAMETER, error);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user