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

Unified Diff: Source/wtf/RawPtr.h

Issue 187283006: Add RawPtr constructor taking a reference argument. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: 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 | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/wtf/RawPtr.h
diff --git a/Source/wtf/RawPtr.h b/Source/wtf/RawPtr.h
index 146aaf3d5c639a2e402a4cad2ba0d6ada072cf80..953c363b85d23fb6c44d4a5434d73c6673cdb4e5 100644
--- a/Source/wtf/RawPtr.h
+++ b/Source/wtf/RawPtr.h
@@ -51,6 +51,7 @@ public:
RawPtr() : m_ptr(0) { }
RawPtr(std::nullptr_t) : m_ptr(0) { }
RawPtr(T* ptr) : m_ptr(ptr) { }
+ RawPtr(T& reference) : m_ptr(&reference) { }
Mikhail 2014/03/05 06:33:43 Shouldn't it be explicit? (to prevent from acciden
RawPtr(const RawPtr& other)
: m_ptr(other.get())
{
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698