first round of debug/release merge: introduce wxDEBUG_LEVEL, for now defined as 1 if __WXDEBUG__ is defined, i.e. no real changes; don't use __WXDEBUG__ in the headers to keep debug and release builds ABI-compatible; add functions to customize or disable asserts handling
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@59711 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -92,12 +92,12 @@ public:
|
||||
// MSW-specific
|
||||
// ------------
|
||||
|
||||
#ifdef __WXDEBUG__
|
||||
#if wxDEBUG_LEVEL
|
||||
// this field is solely for error checking: we detect selecting a bitmap
|
||||
// into more than one DC at once or deleting a bitmap still selected into a
|
||||
// DC (both are serious programming errors under Windows)
|
||||
wxDC *m_selectedInto;
|
||||
#endif // __WXDEBUG__
|
||||
#endif // wxDEBUG_LEVEL
|
||||
|
||||
#if wxUSE_WXDIB
|
||||
// when GetRawData() is called for a DDB we need to convert it to a DIB
|
||||
@@ -185,7 +185,7 @@ IMPLEMENT_DYNAMIC_CLASS(wxBitmapHandler, wxObject)
|
||||
|
||||
wxBitmapRefData::wxBitmapRefData()
|
||||
{
|
||||
#ifdef __WXDEBUG__
|
||||
#if wxDEBUG_LEVEL
|
||||
m_selectedInto = NULL;
|
||||
#endif
|
||||
m_bitmapMask = NULL;
|
||||
@@ -202,7 +202,7 @@ wxBitmapRefData::wxBitmapRefData()
|
||||
wxBitmapRefData::wxBitmapRefData(const wxBitmapRefData& data)
|
||||
: wxGDIImageRefData(data)
|
||||
{
|
||||
#ifdef __WXDEBUG__
|
||||
#if wxDEBUG_LEVEL
|
||||
m_selectedInto = NULL;
|
||||
#endif
|
||||
|
||||
@@ -1188,14 +1188,14 @@ wxBitmap wxBitmap::GetMaskBitmap() const
|
||||
return bmp;
|
||||
}
|
||||
|
||||
#ifdef __WXDEBUG__
|
||||
|
||||
wxDC *wxBitmap::GetSelectedInto() const
|
||||
{
|
||||
#if wxDEBUG_LEVEL
|
||||
return GetBitmapData() ? GetBitmapData()->m_selectedInto : NULL;
|
||||
}
|
||||
|
||||
#else
|
||||
return NULL;
|
||||
#endif
|
||||
}
|
||||
|
||||
void wxBitmap::UseAlpha()
|
||||
{
|
||||
@@ -1212,15 +1212,15 @@ bool wxBitmap::HasAlpha() const
|
||||
// wxBitmap setters
|
||||
// ----------------------------------------------------------------------------
|
||||
|
||||
#ifdef __WXDEBUG__
|
||||
|
||||
void wxBitmap::SetSelectedInto(wxDC *dc)
|
||||
{
|
||||
#if wxDEBUG_LEVEL
|
||||
if ( GetBitmapData() )
|
||||
GetBitmapData()->m_selectedInto = dc;
|
||||
}
|
||||
|
||||
#else
|
||||
wxUnusedVar(dc);
|
||||
#endif
|
||||
}
|
||||
|
||||
#if wxUSE_PALETTE
|
||||
|
||||
|
Reference in New Issue
Block a user