Don't handle wxPNG_TYPE_PALETTE and don't compile PaletteFind() in at all when
wxUSE_PALETTE is off.
Closes #12505.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@66577
c3d73ce0-8a6f-49c7-b76d-
6d57e0e08775
// SaveFile() helpers
// ----------------------------------------------------------------------------
-static int PaletteFind(const png_color& clr,
- const png_color *pal, int palCount)
+#if wxUSE_PALETTE
+
+static int PaletteFind(const png_color& clr, const png_color *pal, int palCount)
{
for (int i = 0; i < palCount; ++i)
{
return wxNOT_FOUND;
}
+#endif // wxUSE_PALETTE
+
// ----------------------------------------------------------------------------
// writing PNGs
// ----------------------------------------------------------------------------
*pData++ = 0;
break;
+#if wxUSE_PALETTE
case wxPNG_TYPE_PALETTE:
*pData++ = (unsigned char) PaletteFind(clr,
palette, numPalette);
break;
+#endif // wxUSE_PALETTE
}
if ( bUseAlpha )