Mark qBound/qMin/qMax as constexpr
On MSVC2015 Q_DECL_CONSTEXPR is defined as empty. Change-Id: I8beb919f75cf2066ffc7ac10d5abfaa1712fc1bb Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
This commit is contained in:
parent
330290e049
commit
bbed8013cc
@ -591,11 +591,11 @@ Q_DECL_CONSTEXPR inline qint64 qRound64(float d)
|
|||||||
{ return d >= 0.0f ? qint64(d + 0.5f) : qint64(d - float(qint64(d-1)) + 0.5f) + qint64(d-1); }
|
{ return d >= 0.0f ? qint64(d + 0.5f) : qint64(d - float(qint64(d-1)) + 0.5f) + qint64(d-1); }
|
||||||
|
|
||||||
template <typename T>
|
template <typename T>
|
||||||
Q_DECL_CONSTEXPR inline const T &qMin(const T &a, const T &b) { return (a < b) ? a : b; }
|
constexpr inline const T &qMin(const T &a, const T &b) { return (a < b) ? a : b; }
|
||||||
template <typename T>
|
template <typename T>
|
||||||
Q_DECL_CONSTEXPR inline const T &qMax(const T &a, const T &b) { return (a < b) ? b : a; }
|
constexpr inline const T &qMax(const T &a, const T &b) { return (a < b) ? b : a; }
|
||||||
template <typename T>
|
template <typename T>
|
||||||
Q_DECL_CONSTEXPR inline const T &qBound(const T &min, const T &val, const T &max)
|
constexpr inline const T &qBound(const T &min, const T &val, const T &max)
|
||||||
{ return qMax(min, qMin(max, val)); }
|
{ return qMax(min, qMin(max, val)); }
|
||||||
|
|
||||||
#ifndef Q_FORWARD_DECLARE_OBJC_CLASS
|
#ifndef Q_FORWARD_DECLARE_OBJC_CLASS
|
||||||
|
Loading…
x
Reference in New Issue
Block a user