From 945c909da9a8ee487da102b8806b6fd76b5f6849 Mon Sep 17 00:00:00 2001 From: Vadim Zeitlin Date: Wed, 18 Nov 2009 09:56:59 +0000 Subject: [PATCH] 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 --- src/common/image.cpp | 8 ++++---- src/richtext/richtexthtml.cpp | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/common/image.cpp b/src/common/image.cpp index a3c9483767..cc63e385c1 100644 --- a/src/common/image.cpp +++ b/src/common/image.cpp @@ -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(r1 * dy1 + r2 * dy); + dst_data[1] = static_cast(g1 * dy1 + g2 * dy); + dst_data[2] = static_cast(b1 * dy1 + b2 * dy); dst_data += 3; if ( src_alpha ) - *dst_alpha++ = a1 * dy1 + a2 * dy; + *dst_alpha++ = static_cast(a1 * dy1 + a2 * dy); } } diff --git a/src/richtext/richtexthtml.cpp b/src/richtext/richtexthtml.cpp index 6079da35c5..6af5ab0ae5 100644 --- a/src/richtext/richtexthtml.cpp +++ b/src/richtext/richtexthtml.cpp @@ -322,7 +322,7 @@ void wxRichTextHTMLHandler::BeginParagraphFormatting(const wxTextAttr& WXUNUSED( str << wxT(">"); // TODO: convert to pixels - int indentPixels = indentLeftMM*10/4; + int indentPixels = static_cast(indentLeftMM*10/4); if ((GetFlags() & wxRICHTEXT_HANDLER_USE_CSS) == 0) {