BDCSVD fix -Wmaybe-uninitialized
diff --git a/Eigen/src/SVD/BDCSVD.h b/Eigen/src/SVD/BDCSVD.h index 6bafc9d..fb67612 100644 --- a/Eigen/src/SVD/BDCSVD.h +++ b/Eigen/src/SVD/BDCSVD.h
@@ -52,9 +52,8 @@ template <typename MatrixType, int Options> struct allocate_small_svd { - static void run(JacobiSVD<MatrixType, Options>& smallSvd, Index rows, Index cols, unsigned int computationOptions) { - (void)computationOptions; - smallSvd = JacobiSVD<MatrixType, Options>(rows, cols); + static void run(JacobiSVD<MatrixType, Options>& smallSvd, Index rows, Index cols, unsigned int) { + internal::construct_at(&smallSvd, rows, cols); } }; @@ -64,7 +63,7 @@ template <typename MatrixType> struct allocate_small_svd<MatrixType, 0> { static void run(JacobiSVD<MatrixType>& smallSvd, Index rows, Index cols, unsigned int computationOptions) { - smallSvd = JacobiSVD<MatrixType>(rows, cols, computationOptions); + internal::construct_at(&smallSvd, rows, cols, computationOptions); } };
diff --git a/Eigen/src/SVD/JacobiSVD.h b/Eigen/src/SVD/JacobiSVD.h index 615aad1..84934db 100644 --- a/Eigen/src/SVD/JacobiSVD.h +++ b/Eigen/src/SVD/JacobiSVD.h
@@ -553,7 +553,8 @@ * \deprecated Will be removed in the next major Eigen version. Options should * be specified in the \a Options template parameter. */ - EIGEN_DEPRECATED JacobiSVD(Index rows, Index cols, unsigned int computationOptions) { + // EIGEN_DEPRECATED // this constructor is used to allocate memory in BDCSVD + JacobiSVD(Index rows, Index cols, unsigned int computationOptions) { internal::check_svd_options_assertions<MatrixType, Options>(computationOptions, rows, cols); allocate(rows, cols, computationOptions); }