From e61b4f2a8acb930b4cb032b47b991faba568295e Mon Sep 17 00:00:00 2001 From: Paul Cornett Date: Sat, 5 Apr 2014 17:13:46 +0000 Subject: [PATCH] avoid double-to-float conversion warnings in headers git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_3_0_BRANCH@76288 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- include/wx/html/htmprint.h | 2 +- include/wx/richtext/richtextbuffer.h | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/include/wx/html/htmprint.h b/include/wx/html/htmprint.h index 3699adae4b..9cf170a461 100644 --- a/include/wx/html/htmprint.h +++ b/include/wx/html/htmprint.h @@ -154,7 +154,7 @@ public: const wxString& normal_face = wxEmptyString, const wxString& fixed_face = wxEmptyString); - void SetMargins(float top = 25.2, float bottom = 25.2, float left = 25.2, float right = 25.2, + void SetMargins(float top = 25.2f, float bottom = 25.2f, float left = 25.2f, float right = 25.2f, float spaces = 5); // sets margins in milimeters. Defaults to 1 inch for margins and 0.5cm for space // between text and header and/or footer diff --git a/include/wx/richtext/richtextbuffer.h b/include/wx/richtext/richtextbuffer.h index 2cf636a420..6b94fdaf49 100644 --- a/include/wx/richtext/richtextbuffer.h +++ b/include/wx/richtext/richtextbuffer.h @@ -402,12 +402,12 @@ public: Returns the floating-pointing value of the dimension in mm. */ - float GetValueMM() const { return float(m_value) / 10.0; } + float GetValueMM() const { return m_value / 10.0f; } /** Sets the value of the dimension in mm. */ - void SetValueMM(float value) { m_value = (int) ((value * 10.0) + 0.5); m_flags |= wxTEXT_ATTR_VALUE_VALID; } + void SetValueMM(float value) { m_value = (int) ((value * 10.0f) + 0.5f); m_flags |= wxTEXT_ATTR_VALUE_VALID; } /** Sets the integer value of the dimension.