X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/7e548f6b13a27eee6f2740d922cab636f0b305e0..7ca106e860dd06773f1b1d286cccfeb69d78468e:/src/common/quantize.cpp diff --git a/src/common/quantize.cpp b/src/common/quantize.cpp index b89425443b..57b311ec3a 100644 --- a/src/common/quantize.cpp +++ b/src/common/quantize.cpp @@ -1,5 +1,5 @@ ///////////////////////////////////////////////////////////////////////////// -// Name: quantize.cpp +// Name: src/common/quantize.cpp // Purpose: wxQuantize implementation // Author: Julian Smart // Modified by: @@ -30,10 +30,6 @@ /* modified by Vaclav Slavik for use as jpeglib-independent module */ -#if defined(__GNUG__) && !defined(NO_GCC_PRAGMA) -#pragma implementation "quantize.h" -#endif - // For compilers that support precompilation, includes "wx/wx.h". #include "wx/wxprec.h" @@ -41,17 +37,17 @@ #pragma hdrstop #endif -#ifndef WX_PRECOMP - #include "wx/palette.h" -#endif - #if wxUSE_IMAGE -#include "wx/image.h" #include "wx/quantize.h" +#ifndef WX_PRECOMP + #include "wx/palette.h" + #include "wx/image.h" +#endif + #ifdef __WXMSW__ -#include "wx/msw/private.h" + #include "wx/msw/private.h" #endif #include @@ -77,7 +73,9 @@ typedef unsigned short UINT16; typedef signed short INT16; +#if !(defined(__WATCOMC__) && (defined(__WXMSW__) || defined(__WXMOTIF__))) typedef signed int INT32; +#endif typedef unsigned char JSAMPLE; typedef JSAMPLE *JSAMPROW; @@ -1569,7 +1567,7 @@ bool wxQuantize::Quantize(const wxImage& src, wxImage& dest, // We need to shift the palette entries up // to make room for the Windows system colours. for (i = 0; i < w * h; i++) - data8bit[i] = data8bit[i] + paletteShift; + data8bit[i] = (unsigned char)(data8bit[i] + paletteShift); } #endif *eightBitData = data8bit; @@ -1623,7 +1621,9 @@ bool wxQuantize::Quantize(const wxImage& src, wxImage& dest, delete[] g; delete[] b; } -#endif // wxUSE_PALETTE +#else // !wxUSE_PALETTE + wxUnusedVar(pPalette); +#endif // wxUSE_PALETTE/!wxUSE_PALETTE return true; } @@ -1654,4 +1654,3 @@ bool wxQuantize::Quantize(const wxImage& src, #endif // wxUSE_IMAGE -