Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(377)

Unified Diff: webrtc/base/scoped_ref_ptr.h

Issue 1972793003: Use scoped_refptr for On(Add|Remove)Stream and OnDataChannel. (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: Adding "deprecated" comments. Created 4 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: webrtc/base/scoped_ref_ptr.h
diff --git a/webrtc/base/scoped_ref_ptr.h b/webrtc/base/scoped_ref_ptr.h
index a71c20ae324e0b806d7cda60ed76cd1fecb5a4b4..ceee445216a3ce6af300c7830f19f528049e4c2c 100644
--- a/webrtc/base/scoped_ref_ptr.h
+++ b/webrtc/base/scoped_ref_ptr.h
@@ -89,6 +89,12 @@ class scoped_refptr {
ptr_->AddRef();
}
+ // Move constructors.
+ scoped_refptr(scoped_refptr<T>&& r) : ptr_(r.release()) {}
+
+ template <typename U>
+ scoped_refptr(scoped_refptr<U>&& r) : ptr_(r.release()) {}
+
~scoped_refptr() {
if (ptr_)
ptr_->Release();

Powered by Google App Engine
This is Rietveld 408576698