diff options
author | 2011-02-05 14:19:53 +0100 | |
---|---|---|
committer | 2011-02-05 14:19:53 +0100 | |
commit | 6c3dc0d243e2948a15d8943a631cc7599c91b8e7 (patch) | |
tree | 0fbad38683f81c4f2b8fa8025ac8b200402a8251 /Eigen/src | |
parent | e20f1a44bb137e9becfe1d90156fd1dea0ae0e5e (diff) |
Fix Diagonal related const correctness issues.
Diffstat (limited to 'Eigen/src')
-rw-r--r-- | Eigen/src/Core/ProductBase.h | 2 | ||||
-rw-r--r-- | Eigen/src/Core/products/CoeffBasedProduct.h | 6 |
2 files changed, 4 insertions, 4 deletions
diff --git a/Eigen/src/Core/ProductBase.h b/Eigen/src/Core/ProductBase.h index 287ea554f..3bd3487d6 100644 --- a/Eigen/src/Core/ProductBase.h +++ b/Eigen/src/Core/ProductBase.h @@ -134,7 +134,7 @@ class ProductBase : public MatrixBase<Derived> return m_result; } - const Diagonal<FullyLazyCoeffBaseProductType,0> diagonal() const + const Diagonal<const FullyLazyCoeffBaseProductType,0> diagonal() const { return FullyLazyCoeffBaseProductType(m_lhs, m_rhs); } template<int Index> diff --git a/Eigen/src/Core/products/CoeffBasedProduct.h b/Eigen/src/Core/products/CoeffBasedProduct.h index 878956a33..dc20f7e1e 100644 --- a/Eigen/src/Core/products/CoeffBasedProduct.h +++ b/Eigen/src/Core/products/CoeffBasedProduct.h @@ -213,14 +213,14 @@ class CoeffBasedProduct const _LhsNested& lhs() const { return m_lhs; } const _RhsNested& rhs() const { return m_rhs; } - const Diagonal<LazyCoeffBasedProductType,0> diagonal() const + const Diagonal<const LazyCoeffBasedProductType,0> diagonal() const { return reinterpret_cast<const LazyCoeffBasedProductType&>(*this); } template<int DiagonalIndex> - const Diagonal<LazyCoeffBasedProductType,DiagonalIndex> diagonal() const + const Diagonal<const LazyCoeffBasedProductType,DiagonalIndex> diagonal() const { return reinterpret_cast<const LazyCoeffBasedProductType&>(*this); } - const Diagonal<LazyCoeffBasedProductType,Dynamic> diagonal(Index index) const + const Diagonal<const LazyCoeffBasedProductType,Dynamic> diagonal(Index index) const { return reinterpret_cast<const LazyCoeffBasedProductType&>(*this).diagonal(index); } protected: |