From bc1808794db670432e5c98c1b94119748c808843 Mon Sep 17 00:00:00 2001 From: Marc Mutz Date: Wed, 30 Jun 2021 13:54:19 +0200 Subject: tst_QMatrixNxN: fix type-punning warning MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ... by making the test class a friend of the CUT, as we do elsewhere for the same reason. This allows to remove the duplicated enum and struct in favor of using The Real Thing™, which means the test can no longer go out of sync with the CUT anymore. Change-Id: I87dc8bb4a5476ae4fc99e006c4690e96d2f530d2 Reviewed-by: Giuseppe D'Angelo Reviewed-by: Friedemann Kleint --- src/gui/math3d/qmatrix4x4.h | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'src/gui/math3d') diff --git a/src/gui/math3d/qmatrix4x4.h b/src/gui/math3d/qmatrix4x4.h index c077581a3e..15c5cabbf2 100644 --- a/src/gui/math3d/qmatrix4x4.h +++ b/src/gui/math3d/qmatrix4x4.h @@ -47,6 +47,8 @@ #include #include +class tst_QMatrixNxN; + QT_BEGIN_NAMESPACE @@ -210,6 +212,8 @@ private: Flags flagBits; QMatrix4x4 orthonormalInverse() const; + + friend class ::tst_QMatrixNxN; // for access to flagBits }; Q_DECLARE_OPERATORS_FOR_FLAGS(QMatrix4x4::Flags) -- cgit v1.2.3