X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/bdd6a03de766061057dbd747637446782193afa9..b736d59eb531794e6b1cef2b4997c517569ff0dd:/include/wx/scopedptr.h diff --git a/include/wx/scopedptr.h b/include/wx/scopedptr.h index 8faa383c89..5cc0c0770d 100644 --- a/include/wx/scopedptr.h +++ b/include/wx/scopedptr.h @@ -3,7 +3,6 @@ // Purpose: scoped smart pointer class // Author: Jesse Lovelace // Created: 06/01/02 -// RCS-ID: $Id$ // Copyright: (c) Jesse Lovelace and original Boost authors (see below) // (c) 2009 Vadim Zeitlin // Licence: wxWindows licence @@ -129,14 +128,7 @@ public: \ \ ~name(); \ \ - void reset(T * ptr = NULL) \ - { \ - if (m_ptr != ptr) \ - { \ - wxCHECKED_DELETE(m_ptr);\ - m_ptr = ptr; \ - } \ - } \ + void reset(T * ptr = NULL); \ \ T *release() \ { \ @@ -171,6 +163,14 @@ public: \ }; #define wxDEFINE_SCOPED_PTR(T, name)\ +void name::reset(T * ptr) \ +{ \ + if (m_ptr != ptr) \ + { \ + wxCHECKED_DELETE(m_ptr); \ + m_ptr = ptr; \ + } \ +} \ name::~name() \ { \ wxCHECKED_DELETE(m_ptr); \