diff options
author | Lars Knoll <lars.knoll@qt.io> | 2020-09-03 09:50:19 +0200 |
---|---|---|
committer | Lars Knoll <lars.knoll@qt.io> | 2020-09-05 02:07:29 +0200 |
commit | db61425225013b720a174da4c1766f3ff90d5cb8 (patch) | |
tree | 52521940a3a043027d43c7dfa0ff8bab23d34916 /src | |
parent | e6c9ef72a9d39a450909aa49030bcae1724af23d (diff) |
Remove some obsolete code
Those checks aren't required anymore for Qt 6.
Change-Id: Ida9f93544f42cb03723659a81e0094aa0cf14799
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
Diffstat (limited to 'src')
-rw-r--r-- | src/gui/math3d/qvector2d.cpp | 30 | ||||
-rw-r--r-- | src/gui/math3d/qvector3d.cpp | 32 | ||||
-rw-r--r-- | src/gui/math3d/qvector4d.cpp | 33 |
3 files changed, 0 insertions, 95 deletions
diff --git a/src/gui/math3d/qvector2d.cpp b/src/gui/math3d/qvector2d.cpp index bd5d9edbf8..aa2d332f9e 100644 --- a/src/gui/math3d/qvector2d.cpp +++ b/src/gui/math3d/qvector2d.cpp @@ -52,36 +52,6 @@ QT_BEGIN_NAMESPACE static_assert(std::is_standard_layout<QVector2D>::value, "QVector2D is supposed to be standard layout"); static_assert(sizeof(QVector2D) == sizeof(float) * 2, "QVector2D is not supposed to have padding at the end"); -// QVector2D used to be defined as class QVector2D { float x, y; };, -// now instead it is defined as classs QVector2D { float v[2]; };. -// Check that binary compatibility is preserved. -// ### Qt 6: remove all of these checks. - -namespace { - -struct QVector2DOld -{ - float x, y; -}; - -struct QVector2DNew -{ - float v[2]; -}; - -static_assert(std::is_standard_layout<QVector2DOld>::value, "Binary compatibility break in QVector2D"); -static_assert(std::is_standard_layout<QVector2DNew>::value, "Binary compatibility break in QVector2D"); - -static_assert(sizeof(QVector2DOld) == sizeof(QVector2DNew), "Binary compatibility break in QVector2D"); - -// requires a constexpr offsetof -#if !defined(Q_CC_MSVC) || (_MSC_VER >= 1910) -static_assert(offsetof(QVector2DOld, x) == offsetof(QVector2DNew, v) + sizeof(QVector2DNew::v[0]) * 0, "Binary compatibility break in QVector2D"); -static_assert(offsetof(QVector2DOld, y) == offsetof(QVector2DNew, v) + sizeof(QVector2DNew::v[0]) * 1, "Binary compatibility break in QVector2D"); -#endif - -} // anonymous namespace - /*! \class QVector2D \brief The QVector2D class represents a vector or vertex in 2D space. diff --git a/src/gui/math3d/qvector3d.cpp b/src/gui/math3d/qvector3d.cpp index 312679a365..906434aca2 100644 --- a/src/gui/math3d/qvector3d.cpp +++ b/src/gui/math3d/qvector3d.cpp @@ -54,38 +54,6 @@ QT_BEGIN_NAMESPACE static_assert(std::is_standard_layout<QVector3D>::value, "QVector3D is supposed to be standard layout"); static_assert(sizeof(QVector3D) == sizeof(float) * 3, "QVector3D is not supposed to have padding at the end"); -// QVector3D used to be defined as class QVector3D { float x, y, z; };, -// now instead it is defined as classs QVector3D { float v[3]; };. -// Check that binary compatibility is preserved. -// ### Qt 6: remove all of these checks. - -namespace { - -struct QVector3DOld -{ - float x, y, z; -}; - -struct QVector3DNew -{ - float v[3]; -}; - -static_assert(std::is_standard_layout<QVector3DOld>::value, "Binary compatibility break in QVector3D"); -static_assert(std::is_standard_layout<QVector3DNew>::value, "Binary compatibility break in QVector3D"); - -static_assert(sizeof(QVector3DOld) == sizeof(QVector3DNew), "Binary compatibility break in QVector3D"); - -// requires a constexpr offsetof -#if !defined(Q_CC_MSVC) || (_MSC_VER >= 1910) -static_assert(offsetof(QVector3DOld, x) == offsetof(QVector3DNew, v) + sizeof(QVector3DNew::v[0]) * 0, "Binary compatibility break in QVector3D"); -static_assert(offsetof(QVector3DOld, y) == offsetof(QVector3DNew, v) + sizeof(QVector3DNew::v[0]) * 1, "Binary compatibility break in QVector3D"); -static_assert(offsetof(QVector3DOld, z) == offsetof(QVector3DNew, v) + sizeof(QVector3DNew::v[0]) * 2, "Binary compatibility break in QVector3D"); -#endif - - -} // anonymous namespace - /*! \class QVector3D \brief The QVector3D class represents a vector or vertex in 3D space. diff --git a/src/gui/math3d/qvector4d.cpp b/src/gui/math3d/qvector4d.cpp index c42986d777..cf0c033e86 100644 --- a/src/gui/math3d/qvector4d.cpp +++ b/src/gui/math3d/qvector4d.cpp @@ -52,39 +52,6 @@ QT_BEGIN_NAMESPACE static_assert(std::is_standard_layout<QVector4D>::value, "QVector4D is supposed to be standard layout"); static_assert(sizeof(QVector4D) == sizeof(float) * 4, "QVector4D is not supposed to have padding at the end"); -// QVector4D used to be defined as class QVector4D { float x, y, z, w; };, -// now instead it is defined as classs QVector4D { float v[4]; };. -// Check that binary compatibility is preserved. -// ### Qt 6: remove all of these checks. - -namespace { - -struct QVector4DOld -{ - float x, y, z, w; -}; - -struct QVector4DNew -{ - float v[4]; -}; - -static_assert(std::is_standard_layout<QVector4DOld>::value, "Binary compatibility break in QVector4D"); -static_assert(std::is_standard_layout<QVector4DNew>::value, "Binary compatibility break in QVector4D"); - -static_assert(sizeof(QVector4DOld) == sizeof(QVector4DNew), "Binary compatibility break in QVector4D"); - -// requires a constexpr offsetof -#if !defined(Q_CC_MSVC) || (_MSC_VER >= 1910) -static_assert(offsetof(QVector4DOld, x) == offsetof(QVector4DNew, v) + sizeof(QVector4DNew::v[0]) * 0, "Binary compatibility break in QVector4D"); -static_assert(offsetof(QVector4DOld, y) == offsetof(QVector4DNew, v) + sizeof(QVector4DNew::v[0]) * 1, "Binary compatibility break in QVector4D"); -static_assert(offsetof(QVector4DOld, z) == offsetof(QVector4DNew, v) + sizeof(QVector4DNew::v[0]) * 2, "Binary compatibility break in QVector4D"); -static_assert(offsetof(QVector4DOld, w) == offsetof(QVector4DNew, v) + sizeof(QVector4DNew::v[0]) * 3, "Binary compatibility break in QVector4D"); -#endif - - -} // anonymous namespace - /*! \class QVector4D \brief The QVector4D class represents a vector or vertex in 4D space. |