Suppress harmless g++ warnings about converting float/double to int.
The conversion is done on purpose on these places so just suppress the warning by using explicit casts. git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@62679 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -668,13 +668,13 @@ wxImage wxImage::ResampleBilinear(int width, int height) const
|
||||
|
||||
//result lines
|
||||
|
||||
dst_data[0] = r1 * dy1 + r2 * dy;
|
||||
dst_data[1] = g1 * dy1 + g2 * dy;
|
||||
dst_data[2] = b1 * dy1 + b2 * dy;
|
||||
dst_data[0] = static_cast<unsigned char>(r1 * dy1 + r2 * dy);
|
||||
dst_data[1] = static_cast<unsigned char>(g1 * dy1 + g2 * dy);
|
||||
dst_data[2] = static_cast<unsigned char>(b1 * dy1 + b2 * dy);
|
||||
dst_data += 3;
|
||||
|
||||
if ( src_alpha )
|
||||
*dst_alpha++ = a1 * dy1 + a2 * dy;
|
||||
*dst_alpha++ = static_cast<unsigned char>(a1 * dy1 + a2 * dy);
|
||||
}
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user