From: Václav Slavík Date: Tue, 31 Oct 2006 14:31:06 +0000 (+0000) Subject: compilation fix for !wxUSE_PALETTE X-Git-Url: https://git.saurik.com/wxWidgets.git/commitdiff_plain/6e3d5828092893fa94725ecc09a6a84c9286ccda compilation fix for !wxUSE_PALETTE git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@42848 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- diff --git a/src/common/imagtga.cpp b/src/common/imagtga.cpp index bf99b1af4c..281682cbb9 100644 --- a/src/common/imagtga.cpp +++ b/src/common/imagtga.cpp @@ -218,13 +218,10 @@ int ReadTGA(wxImage* image, wxInputStream& stream) b[i] = buf[0]; } - #if wxUSE_PALETTE - +#if wxUSE_PALETTE // Set the palette of the image. - image->SetPalette(wxPalette(paletteLength, r, g, b)); - - #endif // wxUSE_PALETTE +#endif // wxUSE_PALETTE delete[] r; delete[] g; @@ -235,6 +232,7 @@ int ReadTGA(wxImage* image, wxInputStream& stream) switch (imageType) { +#if wxUSE_PALETTE // Raw indexed. case 1: @@ -296,6 +294,7 @@ int ReadTGA(wxImage* image, wxInputStream& stream) } } break; +#endif // wxUSE_PALETTE // Raw RGB. @@ -428,6 +427,7 @@ int ReadTGA(wxImage* image, wxInputStream& stream) } break; +#if wxUSE_PALETTE // RLE indexed. case 9: @@ -489,6 +489,7 @@ int ReadTGA(wxImage* image, wxInputStream& stream) } } break; +#endif // wxUSE_PALETTE // RLE RGB.