fixes for wxUSE_PALETTE=0 compilation

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@11763 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Vadim Zeitlin
2001-09-30 23:05:30 +00:00
parent bff995bf71
commit b11e8fb666
3 changed files with 353 additions and 310 deletions

View File

@@ -277,9 +277,10 @@ int ReadPCX(wxImage *image, wxInputStream& stream)
*(p++) = pal[3 * index + 2];
}
unsigned char* r = new unsigned char[256];
unsigned char* g = new unsigned char[256];
unsigned char* b = new unsigned char[256];
#if wxUSE_PALETTE
unsigned char r[256];
unsigned char g[256];
unsigned char b[256];
for (i = 0; i < 256; i++)
{
r[i] = pal[3*i + 0];
@@ -287,7 +288,7 @@ int ReadPCX(wxImage *image, wxInputStream& stream)
b[i] = pal[3*i + 2];
}
image->SetPalette(wxPalette(256, r, g, b));
delete[] r; delete[] g; delete[] b;
#endif // wxUSE_PALETTE
}
return wxPCX_OK;