Fixed ctor from const raw data for Matrices and added the missing implementation for Arrays.

Fixed a warning regarding the conversion from int to bool in MapBase.
This commit is contained in:
Hauke Heibel
2010-12-15 15:19:51 +01:00
parent 6a9a6bbc78
commit 6f5c45ceff
3 changed files with 10 additions and 3 deletions

View File

@@ -182,11 +182,18 @@ template<typename PlainObjectType, int MapOptions, typename StrideType> class Ma
StrideType m_stride;
};
template<typename _Scalar, int _Rows, int _Cols, int _Options, int _MaxRows, int _MaxCols>
inline Array<_Scalar, _Rows, _Cols, _Options, _MaxRows, _MaxCols>
::Array(const Scalar *data)
{
_set_noalias(Eigen::Map<const Array>(data));
}
template<typename _Scalar, int _Rows, int _Cols, int _Options, int _MaxRows, int _MaxCols>
inline Matrix<_Scalar, _Rows, _Cols, _Options, _MaxRows, _MaxCols>
::Matrix(const Scalar *data)
{
_set_noalias(Eigen::Map<Matrix>(data));
_set_noalias(Eigen::Map<const Matrix>(data));
}
#endif // EIGEN_MAP_H