X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/7a893a3152a6ac676b0409320daef188a7be1b7b..cc4d5638c66a409e421420ed7110917755a66788:/src/common/quantize.cpp?ds=sidebyside diff --git a/src/common/quantize.cpp b/src/common/quantize.cpp index c230b983d9..618f4e26b6 100644 --- a/src/common/quantize.cpp +++ b/src/common/quantize.cpp @@ -1,10 +1,9 @@ ///////////////////////////////////////////////////////////////////////////// -// Name: quantize.cpp +// Name: src/common/quantize.cpp // Purpose: wxQuantize implementation // Author: Julian Smart // Modified by: // Created: 22/6/2000 -// RCS-ID: $Id$ // Copyright: (c) Thomas G. Lane, Vaclav Slavik, Julian Smart // Licence: wxWindows licence + JPEG library licence ///////////////////////////////////////////////////////////////////////////// @@ -30,10 +29,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 +36,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 +72,7 @@ typedef unsigned short UINT16; typedef signed short INT16; -#if !(defined(__WATCOMC__) && defined(__WXMSW__)) +#if !(defined(__WATCOMC__) && (defined(__WXMSW__) || defined(__WXMOTIF__))) typedef signed int INT32; #endif @@ -1550,7 +1545,7 @@ bool wxQuantize::Quantize(const wxImage& src, wxImage& dest, if (flags & wxQUANTIZE_FILL_DESTINATION_IMAGE) { - if (!dest.Ok()) + if (!dest.IsOk()) dest.Create(w, h); imgdt = dest.GetData(); @@ -1625,7 +1620,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; }