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:
@@ -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)); }
|
||||
|
Reference in New Issue
Block a user