Use wxUSE_WXDIB in preprocessor tests.

NEVER_USE_DIB is meant to be used only in conjunction with
{SOMETIMES,ALWAYS}_USE_DIB constants, use wxUSE_WXDIB elsewhere.

This is more logical and also fixes inadvertent use of NEVER_USE_DIB before it
is defined added by the changes of r75648.

See #13328.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@75652 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Vadim Zeitlin 2014-01-19 14:14:23 +00:00
parent c4e312efb9
commit 239d77c8e4

View File

@ -71,10 +71,10 @@ public:
// Creates a new bitmap (DDB or DIB) from the contents of the given DIB. // Creates a new bitmap (DDB or DIB) from the contents of the given DIB.
void CopyFromDIB(const wxDIB& dib); void CopyFromDIB(const wxDIB& dib);
#ifndef NEVER_USE_DIB #if wxUSE_WXDIB
// Takes ownership of the given DIB. // Takes ownership of the given DIB.
bool AssignDIB(wxDIB& dib); bool AssignDIB(wxDIB& dib);
#endif // !NEVER_USE_DIB #endif // wxUSE_WXDIB
// set the mask object to use as the mask, we take ownership of it // set the mask object to use as the mask, we take ownership of it
@ -295,7 +295,7 @@ void wxBitmapRefData::CopyFromDIB(const wxDIB& dib)
InitFromDIB(dib, hbitmap); InitFromDIB(dib, hbitmap);
} }
#ifndef NEVER_USE_DIB #if wxUSE_WXDIB
bool wxBitmapRefData::AssignDIB(wxDIB& dib) bool wxBitmapRefData::AssignDIB(wxDIB& dib)
{ {
@ -310,7 +310,7 @@ bool wxBitmapRefData::AssignDIB(wxDIB& dib)
return true; return true;
} }
#endif // !NEVER_USE_DIB #endif // wxUSE_WXDIB
// ---------------------------------------------------------------------------- // ----------------------------------------------------------------------------
// wxBitmap creation // wxBitmap creation
@ -477,7 +477,7 @@ bool wxBitmap::CopyFromIcon(const wxIcon& icon, wxBitmapTransparency transp)
return CopyFromIconOrCursor(icon, transp); return CopyFromIconOrCursor(icon, transp);
} }
#ifndef NEVER_USE_DIB #if wxUSE_WXDIB
bool wxBitmap::CopyFromDIB(const wxDIB& dib) bool wxBitmap::CopyFromDIB(const wxDIB& dib)
{ {
@ -511,7 +511,7 @@ bool wxBitmap::ConvertToDIB()
return GetBitmapData()->AssignDIB(dib); return GetBitmapData()->AssignDIB(dib);
} }
#endif // NEVER_USE_DIB #endif // wxUSE_WXDIB
wxBitmap::~wxBitmap() wxBitmap::~wxBitmap()
{ {