diff --git a/include/wx/html/htmprint.h b/include/wx/html/htmprint.h
index ccb8aa4963..88eb7fe9f5 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 84b526da3e..dbfda5f288 100644
--- a/include/wx/richtext/richtextbuffer.h
+++ b/include/wx/richtext/richtextbuffer.h
@@ -404,12 +404,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.