From 524c329ab23fb565eff8aa2bf36d134e97773a99 Mon Sep 17 00:00:00 2001 From: Rasmus Munk Larsen Date: Tue, 9 May 2023 18:53:56 +0000 Subject: [PATCH] Work around compiler bug in Umeyama.h. --- Eigen/src/Geometry/Umeyama.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Eigen/src/Geometry/Umeyama.h b/Eigen/src/Geometry/Umeyama.h index 804978720..d65314e2b 100644 --- a/Eigen/src/Geometry/Umeyama.h +++ b/Eigen/src/Geometry/Umeyama.h @@ -136,7 +136,8 @@ umeyama(const MatrixBase& src, const MatrixBase& dst, boo VectorType S = VectorType::Ones(m); if ( svd.matrixU().determinant() * svd.matrixV().determinant() < 0 ) - S(m-1) = -1; + Index tmp = m - 1; + S(tmp) = -1; // Eq. (40) and (43) Rt.block(0,0,m,m).noalias() = svd.matrixU() * S.asDiagonal() * svd.matrixV().transpose();