diff options
author | 2009-07-21 11:19:52 +0200 | |
---|---|---|
committer | 2009-07-21 11:19:52 +0200 | |
commit | afa8f2ca952e52201b36813b848aa7a68fca70e9 (patch) | |
tree | 9360f6ca7eb9711d469040fa9c34219fe158ccd7 /Eigen/src/Core/MapBase.h | |
parent | 34490f1493f8111c131e471a3dc7f6fbe5687404 (diff) |
* various fixes related to sub diagonals and band matrix
* allows 0 sized objects in Block/Map
Diffstat (limited to 'Eigen/src/Core/MapBase.h')
-rw-r--r-- | Eigen/src/Core/MapBase.h | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/Eigen/src/Core/MapBase.h b/Eigen/src/Core/MapBase.h index eddb19b03..721f2d476 100644 --- a/Eigen/src/Core/MapBase.h +++ b/Eigen/src/Core/MapBase.h @@ -154,16 +154,16 @@ template<typename Derived> class MapBase m_cols(ColsAtCompileTime == Dynamic ? size : ColsAtCompileTime) { EIGEN_STATIC_ASSERT_VECTOR_ONLY(Derived) - ei_assert(size > 0 || data == 0); - ei_assert(SizeAtCompileTime == Dynamic || SizeAtCompileTime == size); + ei_assert(size >= 0); + ei_assert(data == 0 || SizeAtCompileTime == Dynamic || SizeAtCompileTime == size); } inline MapBase(const Scalar* data, int rows, int cols) : m_data(data), m_rows(rows), m_cols(cols) { ei_assert( (data == 0) - || ( rows > 0 && (RowsAtCompileTime == Dynamic || RowsAtCompileTime == rows) - && cols > 0 && (ColsAtCompileTime == Dynamic || ColsAtCompileTime == cols))); + || ( rows >= 0 && (RowsAtCompileTime == Dynamic || RowsAtCompileTime == rows) + && cols >= 0 && (ColsAtCompileTime == Dynamic || ColsAtCompileTime == cols))); } Derived& operator=(const MapBase& other) |