uninitialized variable warning fixed (modified patch 1434065)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@37929 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -653,6 +653,7 @@ static const char *ParseColor(const char *data)
|
|||||||
|
|
||||||
struct wxXPMColourMapData
|
struct wxXPMColourMapData
|
||||||
{
|
{
|
||||||
|
wxXPMColourMapData() { R = G = B = 0; }
|
||||||
unsigned char R,G,B;
|
unsigned char R,G,B;
|
||||||
};
|
};
|
||||||
WX_DECLARE_STRING_HASH_MAP(wxXPMColourMapData, wxXPMColourMap);
|
WX_DECLARE_STRING_HASH_MAP(wxXPMColourMapData, wxXPMColourMap);
|
||||||
@@ -699,6 +700,7 @@ wxImage wxXPMDecoder::ReadData(const char **xpm_data)
|
|||||||
/*
|
/*
|
||||||
* Create colour map:
|
* Create colour map:
|
||||||
*/
|
*/
|
||||||
|
wxXPMColourMapData clr_data;
|
||||||
for (i = 0; i < colors_cnt; i++)
|
for (i = 0; i < colors_cnt; i++)
|
||||||
{
|
{
|
||||||
const char *xmpColLine = xpm_data[1 + i];
|
const char *xmpColLine = xpm_data[1 + i];
|
||||||
@@ -711,8 +713,6 @@ wxImage wxXPMDecoder::ReadData(const char **xpm_data)
|
|||||||
return wxNullImage;
|
return wxNullImage;
|
||||||
}
|
}
|
||||||
|
|
||||||
wxXPMColourMapData clr_data;
|
|
||||||
|
|
||||||
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] = (wxChar)xmpColLine[i_key];
|
||||||
clr_def = ParseColor(xmpColLine + chars_per_pixel);
|
clr_def = ParseColor(xmpColLine + chars_per_pixel);
|
||||||
|
Reference in New Issue
Block a user