diff options
author | 2007-12-19 08:14:00 +0000 | |
---|---|---|
committer | 2007-12-19 08:14:00 +0000 | |
commit | 59be5c31242a333502a76b53122f69306382cd6f (patch) | |
tree | 63cf95435ca05260c3f0af73334caf8233141771 /src/Core/MatrixBase.h | |
parent | 8bb98a80b462c55f63f11be7c24c1822554f2153 (diff) |
enforce constness in map(), do only one const_cast, and improve API
Diffstat (limited to 'src/Core/MatrixBase.h')
-rw-r--r-- | src/Core/MatrixBase.h | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/src/Core/MatrixBase.h b/src/Core/MatrixBase.h index c37b098f8..83b6fa169 100644 --- a/src/Core/MatrixBase.h +++ b/src/Core/MatrixBase.h @@ -95,9 +95,12 @@ template<typename Scalar, typename Derived> class MatrixBase diagonal(const OtherDerived& coeffs); DiagonalCoeffs<Derived> diagonal() const; - static Map<Derived> map(const Scalar* array, int rows, int cols); - static Map<Derived> map(const Scalar* array, int size); - static Map<Derived> map(const Scalar* array); + static const Map<Derived> map(const Scalar* array, int rows, int cols); + static const Map<Derived> map(const Scalar* array, int size); + static const Map<Derived> map(const Scalar* array); + static Map<Derived> map(Scalar* array, int rows, int cols); + static Map<Derived> map(Scalar* array, int size); + static Map<Derived> map(Scalar* array); template<typename OtherDerived> bool isApprox( |