X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/bdd6a03de766061057dbd747637446782193afa9..ab67e8874db324fab5223cc8d5dff8a8de3e2b77:/include/wx/scopedptr.h?ds=sidebyside diff --git a/include/wx/scopedptr.h b/include/wx/scopedptr.h index 8faa383c89..f31a4ef036 100644 --- a/include/wx/scopedptr.h +++ b/include/wx/scopedptr.h @@ -129,14 +129,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 +164,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); \