blind fix for wxMotif compilation with wxHAVE_LIB_XPM == 0
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@20342 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -1357,12 +1357,9 @@ bool wxXPMFileHandler::LoadFile(wxBitmap *bitmap, const wxString& name,
|
|||||||
if (stream.Ok())
|
if (stream.Ok())
|
||||||
{
|
{
|
||||||
wxImage image(decoder.ReadFile(stream));
|
wxImage image(decoder.ReadFile(stream));
|
||||||
if (image.Ok())
|
return image.Ok() && bitmap->CreateFromImage(image);
|
||||||
return CreateFromImage(image);
|
|
||||||
else
|
|
||||||
return FALSE;
|
|
||||||
}
|
}
|
||||||
else
|
#else // !wxHAVE_LIB_XPM && !wxUSE_STREAMS
|
||||||
return FALSE;
|
return FALSE;
|
||||||
#endif // wxHAVE_LIB_XPM / wxUSE_STREAMS
|
#endif // wxHAVE_LIB_XPM / wxUSE_STREAMS
|
||||||
}
|
}
|
||||||
@@ -1471,14 +1468,11 @@ bool wxXPMDataHandler::Create(wxBitmap *bitmap, void *bits,
|
|||||||
|
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
#else
|
#else // !wxHAVE_LIB_XPM
|
||||||
wxXPMDecoder decoder;
|
wxXPMDecoder decoder;
|
||||||
wxImage image(decoder.ReadData(bits));
|
wxImage image(decoder.ReadData((const char **)bits));
|
||||||
if (image.Ok())
|
return image.Ok() && bitmap->CreateFromImage(image);
|
||||||
return bitmap->CreateFromImage(image);
|
#endif // wxHAVE_LIB_XPM/!wxHAVE_LIB_XPM
|
||||||
else
|
|
||||||
return FALSE;
|
|
||||||
#endif
|
|
||||||
}
|
}
|
||||||
|
|
||||||
#endif // wxUSE_XPM
|
#endif // wxUSE_XPM
|
||||||
|
Reference in New Issue
Block a user