Details
-
Suggestion
-
Resolution: Done
-
P3: Somewhat important
-
5.11.1
-
None
Description
When building qt applications with qreal being floats you almost always run into compiler errors with qMax/qMin being called with double/float or v.s. This is also the case for the Qt code base itself ( see QTBUG-69573 ).
This type of problem could be avoided in general by introducing special versions of qMin/qMax - something like this:
inline qreal qMin( float v1, double v2 ) { return qMin( double( v1 ), v2 ); }
inline qreal qMin( double v1, float v2 ) { return qMin( v1, double( v2 ) ); }
...