X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/194142ed6fec5b7bc09e19b093db3e5d56f3ebc4..64ea838d8f4d1853b7d850db93ee565e901d099a:/src/common/rendcmn.cpp?ds=sidebyside diff --git a/src/common/rendcmn.cpp b/src/common/rendcmn.cpp index 2cedd7f4de..0987856356 100644 --- a/src/common/rendcmn.cpp +++ b/src/common/rendcmn.cpp @@ -1,12 +1,12 @@ /////////////////////////////////////////////////////////////////////////////// -// Name: common/rendcmn.cpp +// Name: src/common/rendcmn.cpp // Purpose: wxRendererNative common functions // Author: Vadim Zeitlin // Modified by: // Created: 28.07.03 // RCS-ID: $Id$ // Copyright: (c) 2003 Vadim Zeitlin -// License: wxWindows license +// Licence: wxWindows licence /////////////////////////////////////////////////////////////////////////////// // ============================================================================ @@ -32,7 +32,7 @@ #include "wx/apptrait.h" #include "wx/renderer.h" -#include "wx/ptr_scpd.h" +#include "wx/scopedptr.h" #if wxUSE_DYNLIB_CLASS #include "wx/dynlib.h" @@ -42,8 +42,7 @@ // wxRendererPtr: auto pointer holding the global renderer // ---------------------------------------------------------------------------- -wxDECLARE_SCOPED_PTR(wxRendererNative, wxRendererPtrBase); -wxDEFINE_SCOPED_PTR(wxRendererNative, wxRendererPtrBase); +typedef wxScopedPtr wxRendererPtrBase; class wxRendererPtr : public wxRendererPtrBase { @@ -63,12 +62,7 @@ public: } // return the global and unique wxRendererPtr - static wxRendererPtr& Get() - { - static wxRendererPtr s_renderer; - - return s_renderer; - } + static wxRendererPtr& Get(); private: wxRendererPtr() : wxRendererPtrBase(NULL) { m_initialized = false; } @@ -88,9 +82,17 @@ private: // just to suppress a gcc warning friend class wxRendererPtrDummyFriend; - DECLARE_NO_COPY_CLASS(wxRendererPtr) + wxDECLARE_NO_COPY_CLASS(wxRendererPtr); }; +// return the global and unique wxRendererPtr +/*static*/ wxRendererPtr& wxRendererPtr::Get() +{ + static wxRendererPtr s_renderer; + + return s_renderer; +} + #if wxUSE_DYNLIB_CLASS // ---------------------------------------------------------------------------- @@ -203,4 +205,3 @@ wxRendererNative *wxRendererNative::Load(const wxString& name) } #endif // wxUSE_DYNLIB_CLASS -