Suppress gcc -Wfloat-conversion warning in wxFontInfo ctor

Add an explicit cast to avoid warnings when compiling with this option.

While just casting double to float is not the best idea, it seems quite
unlikely that anybody would pass a value outside of float range to this
ctor.
This commit is contained in:
Vadim Zeitlin
2018-09-18 15:57:43 +02:00
parent 9bd3de272a
commit f741031e69

View File

@@ -141,7 +141,7 @@ public:
// Need to define this one to avoid casting double to int too.
explicit wxFontInfo(double pointSize)
{ InitPointSize(pointSize); }
{ InitPointSize(static_cast<float>(pointSize)); }
template <typename T>
explicit wxFontInfo(T pointSize)
{ InitPointSize(ToFloatPointSize(pointSize)); }