diff options
Diffstat (limited to 'src/opengl/qopenglversionfunctions.h')
| -rw-r--r-- | src/opengl/qopenglversionfunctions.h | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/src/opengl/qopenglversionfunctions.h b/src/opengl/qopenglversionfunctions.h index 274ed29c7c3..445f2930696 100644 --- a/src/opengl/qopenglversionfunctions.h +++ b/src/opengl/qopenglversionfunctions.h @@ -94,6 +94,16 @@ struct QOpenGLVersionStatus QPair<int, int> version; OpenGLStatus status; + + friend constexpr bool operator==(const QOpenGLVersionStatus &lhs, const QOpenGLVersionStatus &rhs) noexcept + { + return lhs.status == rhs.status && lhs.version == rhs.version; + } + + friend constexpr bool operator!=(const QOpenGLVersionStatus &lhs, const QOpenGLVersionStatus &rhs) noexcept + { + return !(lhs == rhs); + } }; inline size_t qHash(const QOpenGLVersionStatus &v, size_t seed = 0) noexcept @@ -102,16 +112,6 @@ inline size_t qHash(const QOpenGLVersionStatus &v, size_t seed = 0) noexcept + v.version.first * 100 + v.version.second * 10, seed); } -constexpr inline bool operator==(const QOpenGLVersionStatus &lhs, const QOpenGLVersionStatus &rhs) -{ - return lhs.status == rhs.status && lhs.version == rhs.version; -} - -constexpr inline bool operator!=(const QOpenGLVersionStatus &lhs, const QOpenGLVersionStatus &rhs) -{ - return !operator==(lhs, rhs); -} - #define QT_OPENGL_DECLARE_FUNCTIONS(ret, name, args) \ ret (QOPENGLF_APIENTRYP name)args; #define QT_OPENGL_COUNT_FUNCTIONS(ret, name, args) +1 |
