From 6c3dc0d243e2948a15d8943a631cc7599c91b8e7 Mon Sep 17 00:00:00 2001 From: Hauke Heibel Date: Sat, 5 Feb 2011 14:19:53 +0100 Subject: [PATCH] Fix Diagonal related const correctness issues. --- Eigen/src/Core/ProductBase.h | 2 +- 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 return m_result; } - const Diagonal diagonal() const + const Diagonal diagonal() const { return FullyLazyCoeffBaseProductType(m_lhs, m_rhs); } template 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 diagonal() const + const Diagonal diagonal() const { return reinterpret_cast(*this); } template - const Diagonal diagonal() const + const Diagonal diagonal() const { return reinterpret_cast(*this); } - const Diagonal diagonal(Index index) const + const Diagonal diagonal(Index index) const { return reinterpret_cast(*this).diagonal(index); } protected: