X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/923d28da0eed674dfd7f4a497568ac14a29f0189..165d3652ffb8399626c37e0f65b50560a1369bc5:/src/mac/classic/bitmap.cpp diff --git a/src/mac/classic/bitmap.cpp b/src/mac/classic/bitmap.cpp index 54cc8bba01..0605fc9175 100644 --- a/src/mac/classic/bitmap.cpp +++ b/src/mac/classic/bitmap.cpp @@ -20,9 +20,9 @@ #ifndef WX_PRECOMP #include "wx/log.h" #include "wx/icon.h" + #include "wx/image.h" #endif -#include "wx/image.h" #include "wx/xpmdecod.h" #include "wx/rawbmp.h" @@ -957,7 +957,7 @@ bool wxBitmap::SaveFile(const wxString& filename, wxBitmapType type, return false; } -bool wxBitmap::Ok() const +bool wxBitmap::IsOk() const { return (M_BITMAPDATA && M_BITMAPDATA->m_ok); } @@ -999,25 +999,19 @@ wxMask *wxBitmap::GetMask() const void wxBitmap::SetWidth(int w) { - if (!M_BITMAPDATA) - m_refData = new wxBitmapRefData; - + AllocExclusive(); M_BITMAPDATA->m_width = w; } void wxBitmap::SetHeight(int h) { - if (!M_BITMAPDATA) - m_refData = new wxBitmapRefData; - + AllocExclusive(); M_BITMAPDATA->m_height = h; } void wxBitmap::SetDepth(int d) { - if (!M_BITMAPDATA) - m_refData = new wxBitmapRefData; - + AllocExclusive(); M_BITMAPDATA->m_depth = d; }