Don't call internal::check_rows_cols_for_overflow twice in PlainObjectBase::resize since this is extremely expensive for small arrays

This commit is contained in:
Benoit Steiner 2015-10-29 13:13:39 -07:00
parent 05a0ee25df
commit ac142773a7

View File

@ -263,7 +263,6 @@ class PlainObjectBase : public internal::dense_xpr_base<Derived>::type
m_storage.resize(size, rows, cols); m_storage.resize(size, rows, cols);
if(size_changed) EIGEN_INITIALIZE_COEFFS_IF_THAT_OPTION_IS_ENABLED if(size_changed) EIGEN_INITIALIZE_COEFFS_IF_THAT_OPTION_IS_ENABLED
#else #else
internal::check_rows_cols_for_overflow<MaxSizeAtCompileTime>::run(rows, cols);
m_storage.resize(rows*cols, rows, cols); m_storage.resize(rows*cols, rows, cols);
#endif #endif
} }