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:

committed by
WebRTC LUCI CQ

parent
9609a825eb
commit
ac0d18341d
@ -75,6 +75,8 @@ class scoped_refptr {
|
||||
|
||||
scoped_refptr() : ptr_(nullptr) {}
|
||||
|
||||
// TODO(bugs.webrtc.org/13464): Implicit construction is deprecated. Mark
|
||||
// explicit, and add a new implicit constructor accepting a nullptr_t.
|
||||
scoped_refptr(T* p) : ptr_(p) { // NOLINT(runtime/explicit)
|
||||
if (ptr_)
|
||||
ptr_->AddRef();
|
||||
|
@ -61,7 +61,7 @@ I444Buffer::~I444Buffer() {}
|
||||
|
||||
// static
|
||||
rtc::scoped_refptr<I444Buffer> I444Buffer::Create(int width, int height) {
|
||||
return new rtc::RefCountedObject<I444Buffer>(width, height);
|
||||
return rtc::make_ref_counted<I444Buffer>(width, height);
|
||||
}
|
||||
|
||||
// static
|
||||
@ -70,8 +70,8 @@ rtc::scoped_refptr<I444Buffer> I444Buffer::Create(int width,
|
||||
int stride_y,
|
||||
int stride_u,
|
||||
int stride_v) {
|
||||
return new rtc::RefCountedObject<I444Buffer>(width, height, stride_y,
|
||||
stride_u, stride_v);
|
||||
return rtc::make_ref_counted<I444Buffer>(width, height, stride_y, stride_u,
|
||||
stride_v);
|
||||
}
|
||||
|
||||
// static
|
||||
|
Reference in New Issue
Block a user