From 157756130a154b8b819090fa16bb7f7f3bd5211f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Antonio=20S=C3=A1nchez?= Date: Fri, 15 Mar 2024 17:55:04 +0000 Subject: [PATCH] Restore C++03 compatibility. --- Eigen/src/Geometry/Transform.h | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/Eigen/src/Geometry/Transform.h b/Eigen/src/Geometry/Transform.h index cd9b4f33d..a7756bebe 100644 --- a/Eigen/src/Geometry/Transform.h +++ b/Eigen/src/Geometry/Transform.h @@ -985,8 +985,10 @@ Transform::preshear(const Scalar& sx, const Scalar& sy) { EIGEN_STATIC_ASSERT(int(Dim)==2, YOU_MADE_A_PROGRAMMING_MISTAKE) EIGEN_STATIC_ASSERT(Mode!=int(Isometry), THIS_METHOD_IS_ONLY_FOR_SPECIFIC_TRANSFORMATIONS) - m_matrix.template block(0, 0) = - LinearMatrixType({{1, sy}, {sx, 1}}) * m_matrix.template block(0, 0); + LinearMatrixType shear = LinearMatrixType::Identity(2, 2); + shear.coeffRef(0, 1) = sy; + shear.coeffRef(1, 0) = sx; + m_matrix.template block(0, 0) = shear * m_matrix.template block(0, 0); return *this; }