git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@50922
c3d73ce0-8a6f-49c7-b76d-
6d57e0e08775
int count;
unsigned width, height, colors_cnt, chars_per_pixel;
size_t i, j, i_key;
int count;
unsigned width, height, colors_cnt, chars_per_pixel;
size_t i, j, i_key;
const char *clr_def;
bool hasMask;
wxXPMColourMap clr_tbl;
const char *clr_def;
bool hasMask;
wxXPMColourMap clr_tbl;
return wxNullImage;
img.SetMask(false);
return wxNullImage;
img.SetMask(false);
- key[chars_per_pixel] = wxT('\0');
+ key[chars_per_pixel] = '\0';
}
for (i_key = 0; i_key < chars_per_pixel; i_key++)
}
for (i_key = 0; i_key < chars_per_pixel; i_key++)
- key[i_key] = (wxChar)xmpColLine[i_key];
+ key[i_key] = xmpColLine[i_key];
clr_def = ParseColor(xmpColLine + chars_per_pixel);
if ( clr_def == NULL )
clr_def = ParseColor(xmpColLine + chars_per_pixel);
if ( clr_def == NULL )
unsigned char *img_data = img.GetData();
wxXPMColourMap::iterator entry;
wxXPMColourMap::iterator end = clr_tbl.end();
unsigned char *img_data = img.GetData();
wxXPMColourMap::iterator entry;
wxXPMColourMap::iterator end = clr_tbl.end();
for (j = 0; j < height; j++)
{
for (j = 0; j < height; j++)
{
for (i_key = 0; i_key < chars_per_pixel; i_key++)
{
for (i_key = 0; i_key < chars_per_pixel; i_key++)
{
- key[i_key] = (wxChar)xpmImgLine[chars_per_pixel * i + i_key];
+ key[i_key] = xpmImgLine[chars_per_pixel * i + i_key];
- entry = clr_tbl.find(key);
+ keyString = key;
+ entry = clr_tbl.find(keyString);
if ( entry == end )
{
wxLogError(_("XPM: Malformed pixel data!"));
if ( entry == end )
{
wxLogError(_("XPM: Malformed pixel data!"));