]> git.saurik.com Git - wxWidgets.git/commitdiff
[ 1957970 ] wxWeakRef - assign from other wxWeakRef
authorRobert Roebling <robert@roebling.de>
Tue, 6 May 2008 21:04:23 +0000 (21:04 +0000)
committerRobert Roebling <robert@roebling.de>
Tue, 6 May 2008 21:04:23 +0000 (21:04 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@53470 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

include/wx/weakref.h
interface/weakref.h

index d72ab4ccbc91100c5261112c2d7dbe4aaf17bf3b..6691b60d6d502e53f8acceda534d0e8daeef569d 100644 (file)
@@ -200,6 +200,12 @@ public:
         Assign(pobj);
     }
 
+    // We need this copy ctor, since otherwise a default compiler (binary) copy happens
+    wxWeakRef(const wxWeakRef<T>& wr)
+    {
+        Assign(wr.get());
+    }
+    
     template <class TDerived>
     wxWeakRef<T>& operator=(TDerived* pobj)
     {
index 03a96631303608bd1138a6c62c448955c930bef3..f6522aa39928afd17226f585e3c86566bc39e4ee 100644 (file)
@@ -105,6 +105,11 @@ public:
     */
     wxWeakRef(T* pobj = NULL);
 
+    /**
+        Copy constructor.
+    */
+    wxWeakRef(const wxWeakRef<T>& wr);
+    
     /**
         Destructor.
     */