// 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
wxBitmapRefData::wxBitmapRefData()
{
-#ifdef __WXDEBUG__
+#if wxDEBUG_LEVEL
m_selectedInto = NULL;
#endif
m_bitmapMask = NULL;
wxBitmapRefData::wxBitmapRefData(const wxBitmapRefData& data)
: wxGDIImageRefData(data)
{
-#ifdef __WXDEBUG__
+#if wxDEBUG_LEVEL
m_selectedInto = NULL;
#endif
return bmp;
}
-#ifdef __WXDEBUG__
-
wxDC *wxBitmap::GetSelectedInto() const
{
+#if wxDEBUG_LEVEL
return GetBitmapData() ? GetBitmapData()->m_selectedInto : NULL;
-}
-
+#else
+ return NULL;
#endif
+}
void wxBitmap::UseAlpha()
{
// 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