X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/55a0f1e30311fee4b9694204afe5b5218dd438d1..c9ed413ab4f5673ffff00198dc6ce1397398bda4:/src/osx/carbon/metafile.cpp diff --git a/src/osx/carbon/metafile.cpp b/src/osx/carbon/metafile.cpp index 7bf829e8a2..6e8905e6b4 100644 --- a/src/osx/carbon/metafile.cpp +++ b/src/osx/carbon/metafile.cpp @@ -76,6 +76,11 @@ private: int m_width ; int m_height ; + + + // Our m_pdfDoc field can't be easily (deep) copied and so we don't define a + // copy ctor. + wxDECLARE_NO_COPY_CLASS(wxMetafileRefData); }; wxMetafileRefData::wxMetafileRefData(CFDataRef data) : @@ -175,9 +180,12 @@ wxGDIRefData *wxMetaFile::CreateGDIRefData() const return new wxMetafileRefData; } -wxGDIRefData *wxMetaFile::CloneGDIRefData(const wxGDIRefData *data) const +wxGDIRefData * +wxMetaFile::CloneGDIRefData(const wxGDIRefData * WXUNUSED(data)) const { - return new wxMetafileRefData(*static_cast(data)); + wxFAIL_MSG( wxS("Cloning metafiles is not implemented in wxCarbon.") ); + + return new wxMetafileRefData; } WXHMETAFILE wxMetaFile::GetHMETAFILE() const @@ -318,8 +326,7 @@ void wxMetafileDCImpl::DoGetSize(int *width, int *height) const wxMetaFile *wxMetafileDCImpl::Close() { - delete m_graphicContext; - m_graphicContext = NULL; + wxDELETE(m_graphicContext); m_ok = false; M_METAFILEREFDATA(*m_metaFile)->Close();