Prepare for deleting implicit conversion from raw pointer to scoped_refptr.

Updates all webrtc code, to have a small followup cl to just add the
"explicit" keyword. Patchset #24 passed all webrtc tests, with explicit.

Bug: webrtc:13464
Change-Id: I39863d3752f73209b531120f66916dc9177bf63a
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/242363
Reviewed-by: Tomas Gunnarsson <tommi@webrtc.org>
Commit-Queue: Niels Moller <nisse@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#35718}
This commit is contained in:
Niels Möller
2022-01-17 15:26:54 +01:00
committed by WebRTC LUCI CQ
parent 9609a825eb
commit ac0d18341d
33 changed files with 85 additions and 76 deletions

View File

@ -265,7 +265,7 @@ void CreateOfferObserver::OnSuccess(webrtc::SessionDescriptionInterface* desc) {
webrtc::CreateSessionDescription(webrtc::SdpType::kAnswer, sdp));
pc_->SetRemoteDescription(
std::move(answer),
new rtc::RefCountedObject<SetRemoteSessionDescriptionObserver>());
rtc::make_ref_counted<SetRemoteSessionDescriptionObserver>());
}
void CreateOfferObserver::OnFailure(webrtc::RTCError error) {

View File

@ -220,7 +220,7 @@ void CreateOfferObserver::OnSuccess(webrtc::SessionDescriptionInterface* desc) {
std::unique_ptr<webrtc::SessionDescriptionInterface> answer(
webrtc::CreateSessionDescription(webrtc::SdpType::kAnswer, sdp));
pc_->SetRemoteDescription(std::move(answer),
new rtc::RefCountedObject<SetRemoteSessionDescriptionObserver>());
rtc::make_ref_counted<SetRemoteSessionDescriptionObserver>());
}
void CreateOfferObserver::OnFailure(webrtc::RTCError error) {

View File

@ -85,8 +85,7 @@ class CapturerTrackSource : public webrtc::VideoTrackSource {
capturer = absl::WrapUnique(
webrtc::test::VcmCapturer::Create(kWidth, kHeight, kFps, i));
if (capturer) {
return new rtc::RefCountedObject<CapturerTrackSource>(
std::move(capturer));
return rtc::make_ref_counted<CapturerTrackSource>(std::move(capturer));
}
}

View File

@ -61,7 +61,7 @@ class CapturerTrackSource : public webrtc::VideoTrackSource {
if (!capturer) {
return nullptr;
}
return new rtc::RefCountedObject<CapturerTrackSource>(std::move(capturer));
return rtc::make_ref_counted<CapturerTrackSource>(std::move(capturer));
}
protected: