Updates to fix Watcom C/C++ 11.0 compiler warning problems. Now compiles
clean with this compiler. Hopefully I did this without breaking other compilers. git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@9967 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -414,31 +414,31 @@ void wxImage::Paste( const wxImage &image, int x, int y )
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
if (!HasMask() && image.HasMask())
|
||||
{
|
||||
unsigned char r = image.GetMaskRed();
|
||||
unsigned char g = image.GetMaskGreen();
|
||||
unsigned char b = image.GetMaskBlue();
|
||||
|
||||
|
||||
width *= 3;
|
||||
unsigned char* source_data = image.GetData() + xx*3 + yy*3*image.GetWidth();
|
||||
int source_step = image.GetWidth()*3;
|
||||
|
||||
unsigned char* target_data = GetData() + (x+xx)*3 + (y+yy)*3*M_IMGDATA->m_width;
|
||||
int target_step = M_IMGDATA->m_width*3;
|
||||
|
||||
|
||||
for (int j = 0; j < height; j++)
|
||||
{
|
||||
for (int i = 0; i < width; i+=3)
|
||||
{
|
||||
if ((source_data[i] != r) &&
|
||||
(source_data[i+1] != g) &&
|
||||
if ((source_data[i] != r) &&
|
||||
(source_data[i+1] != g) &&
|
||||
(source_data[i+2] != b))
|
||||
{
|
||||
memcpy( target_data+i, source_data+i, 3 );
|
||||
}
|
||||
}
|
||||
}
|
||||
source_data += source_step;
|
||||
target_data += target_step;
|
||||
}
|
||||
@@ -1140,7 +1140,8 @@ unsigned long wxImage::CountColours( unsigned long stopafter )
|
||||
{
|
||||
wxHashTable h;
|
||||
wxObject dummy;
|
||||
unsigned char r, g, b, *p;
|
||||
unsigned char r, g, b;
|
||||
unsigned char *p;
|
||||
unsigned long size, nentries, key;
|
||||
|
||||
p = GetData();
|
||||
@@ -1174,7 +1175,8 @@ unsigned long wxImage::CountColours( unsigned long stopafter )
|
||||
//
|
||||
unsigned long wxImage::ComputeHistogram( wxHashTable &h )
|
||||
{
|
||||
unsigned char r, g, b, *p;
|
||||
unsigned char r, g, b;
|
||||
unsigned char *p;
|
||||
unsigned long size, nentries, key;
|
||||
wxHNode *hnode;
|
||||
|
||||
|
Reference in New Issue
Block a user