X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/18f3decb46a80b38801dd6590d08eb525d3a3963..4e1fd51de7349097a30b3b994e5c6e9b074de77c:/src/mac/classic/bitmap.cpp diff --git a/src/mac/classic/bitmap.cpp b/src/mac/classic/bitmap.cpp index 952bb1101a..0605fc9175 100644 --- a/src/mac/classic/bitmap.cpp +++ b/src/mac/classic/bitmap.cpp @@ -16,9 +16,13 @@ #endif #include "wx/bitmap.h" -#include "wx/icon.h" -#include "wx/log.h" -#include "wx/image.h" + +#ifndef WX_PRECOMP + #include "wx/log.h" + #include "wx/icon.h" + #include "wx/image.h" +#endif + #include "wx/xpmdecod.h" #include "wx/rawbmp.h" @@ -953,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); } @@ -995,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; } @@ -1433,4 +1431,3 @@ void wxBitmap::UseAlpha() // mask in UngetRawData() M_BITMAPDATA->m_hasAlpha = true; } -