From 6dd21c54339e959e19a0c6574855614f64fe638c Mon Sep 17 00:00:00 2001 From: Robert Roebling Date: Tue, 6 May 2008 21:04:23 +0000 Subject: [PATCH] [ 1957970 ] wxWeakRef - assign from other wxWeakRef git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@53470 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- include/wx/weakref.h | 6 ++++++ interface/weakref.h | 5 +++++ 2 files changed, 11 insertions(+) diff --git a/include/wx/weakref.h b/include/wx/weakref.h index d72ab4ccbc..6691b60d6d 100644 --- a/include/wx/weakref.h +++ b/include/wx/weakref.h @@ -200,6 +200,12 @@ public: Assign(pobj); } + // We need this copy ctor, since otherwise a default compiler (binary) copy happens + wxWeakRef(const wxWeakRef& wr) + { + Assign(wr.get()); + } + template wxWeakRef& operator=(TDerived* pobj) { diff --git a/interface/weakref.h b/interface/weakref.h index 03a9663130..f6522aa399 100644 --- a/interface/weakref.h +++ b/interface/weakref.h @@ -105,6 +105,11 @@ public: */ wxWeakRef(T* pobj = NULL); + /** + Copy constructor. + */ + wxWeakRef(const wxWeakRef& wr); + /** Destructor. */ -- 2.47.2