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

Unified Diff: Source/wtf/PassRefPtr.h

Issue 170603003: Use nullptr_t for RefPtr, PassRefPtr and RawPtr. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Final rebase Created 6 years, 10 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
« no previous file with comments | « Source/wtf/NullPtr.h ('k') | Source/wtf/RawPtr.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/wtf/PassRefPtr.h
diff --git a/Source/wtf/PassRefPtr.h b/Source/wtf/PassRefPtr.h
index 60aface678ec47a2f41a79971bf1b7ee3cb2eac3..828a5ef9cafc4fab8c8fa51550539ded5345f652 100644
--- a/Source/wtf/PassRefPtr.h
+++ b/Source/wtf/PassRefPtr.h
@@ -58,8 +58,10 @@ namespace WTF {
}
template<typename T> class PassRefPtr {
+ WTF_DISALLOW_CONSTRUCTION_FROM_ZERO(PassRefPtr);
public:
PassRefPtr() : m_ptr(0) { }
+ PassRefPtr(std::nullptr_t) : m_ptr(0) { }
PassRefPtr(T* ptr) : m_ptr(ptr) { refIfNotNull(ptr); }
template<typename U> PassRefPtr(const RawPtr<U>& ptr, EnsurePtrConvertibleArgDecl(U, T)) : m_ptr(ptr.get()) { refIfNotNull(m_ptr); }
explicit PassRefPtr(T& ptr) : m_ptr(&ptr) { m_ptr->ref(); }
« no previous file with comments | « Source/wtf/NullPtr.h ('k') | Source/wtf/RawPtr.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698