X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/194142ed6fec5b7bc09e19b093db3e5d56f3ebc4..0e08dd802b39ca3732a4797ab43a4461c8397889:/src/common/rendcmn.cpp diff --git a/src/common/rendcmn.cpp b/src/common/rendcmn.cpp index 2cedd7f4de..b44fcf3a75 100644 --- a/src/common/rendcmn.cpp +++ b/src/common/rendcmn.cpp @@ -1,5 +1,5 @@ /////////////////////////////////////////////////////////////////////////////// -// Name: common/rendcmn.cpp +// Name: src/common/rendcmn.cpp // Purpose: wxRendererNative common functions // Author: Vadim Zeitlin // Modified by: @@ -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; } @@ -91,6 +85,14 @@ private: DECLARE_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 -