From 5266a78aca7dd690b61b61210833ddb5c9bf0337 Mon Sep 17 00:00:00 2001 From: Benoit Jacob Date: Thu, 12 Nov 2009 12:49:00 -0500 Subject: [PATCH] also optionnally initialize by zero after resizing --- Eigen/src/Core/Matrix.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Eigen/src/Core/Matrix.h b/Eigen/src/Core/Matrix.h index 3cd7edfd6..4d49911b6 100644 --- a/Eigen/src/Core/Matrix.h +++ b/Eigen/src/Core/Matrix.h @@ -260,6 +260,7 @@ class Matrix && (MaxColsAtCompileTime == Dynamic || MaxColsAtCompileTime >= cols) && (ColsAtCompileTime == Dynamic || ColsAtCompileTime == cols)); m_storage.resize(rows * cols, rows, cols); + EIGEN_INITIALIZE_BY_ZERO_IF_THAT_OPTION_IS_ENABLED } /** Resizes \c *this to a vector of length \a size @@ -281,6 +282,7 @@ class Matrix m_storage.resize(size, 1, size); else m_storage.resize(size, size, 1); + EIGEN_INITIALIZE_BY_ZERO_IF_THAT_OPTION_IS_ENABLED } /** Resizes the matrix, changing only the number of columns. For the parameter of type NoChange_t, just pass the special value \c NoChange