X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/5185263fc5f0729ea1b926f9c2dcdc0153f6384e..cc8bc5aa9cd14c158de637acb9e5ed8beb066d57:/include/wx/mac/corefoundation/cfstring.h diff --git a/include/wx/mac/corefoundation/cfstring.h b/include/wx/mac/corefoundation/cfstring.h index 23e2f8d75b..526f5791a5 100644 --- a/include/wx/mac/corefoundation/cfstring.h +++ b/include/wx/mac/corefoundation/cfstring.h @@ -9,6 +9,9 @@ // Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// +#ifndef __WX_CFSTRINGHOLDER_H__ +#define __WX_CFSTRINGHOLDER_H__ + #ifdef __DARWIN__ #include #else @@ -32,23 +35,20 @@ void wxMacWakeUp() ; class wxMacCFStringHolder { public: - wxMacCFStringHolder() + wxMacCFStringHolder() + : m_cfs(NULL) , m_release(false) { - m_cfs = NULL ; - m_release = false ; } wxMacCFStringHolder(const wxString &str , wxFontEncoding encoding ) + : m_cfs(NULL) , m_release(false) { - m_cfs = NULL ; - m_release = false ; Assign( str , encoding ) ; } wxMacCFStringHolder(CFStringRef ref , bool release = true ) + : m_cfs(ref) , m_release(release) { - m_cfs = ref ; - m_release = release ; } ~wxMacCFStringHolder() @@ -73,12 +73,15 @@ public: void Assign( const wxString &str , wxFontEncoding encoding ) ; - operator CFStringRef () { return m_cfs; } + operator CFStringRef () const { return m_cfs; } wxString AsString( wxFontEncoding encoding = wxFONTENCODING_DEFAULT ) ; private: CFStringRef m_cfs; bool m_release ; + + DECLARE_NO_COPY_CLASS( wxMacCFStringHolder ) } ; +#endif //__WXCFSTRINGHOLDER_H__