From 36448c9e287935b8c408791bf88b2907292d6c80 Mon Sep 17 00:00:00 2001 From: Christoph Hertzberg Date: Tue, 23 Sep 2014 14:28:23 +0200 Subject: Make constructors explicit if they could lead to unintended implicit conversion --- Eigen/src/Core/SelfAdjointView.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'Eigen/src/Core/SelfAdjointView.h') diff --git a/Eigen/src/Core/SelfAdjointView.h b/Eigen/src/Core/SelfAdjointView.h index 19cb232c9..f5fbd7215 100644 --- a/Eigen/src/Core/SelfAdjointView.h +++ b/Eigen/src/Core/SelfAdjointView.h @@ -67,7 +67,7 @@ template class SelfAdjointView typedef typename MatrixType::PlainObject PlainObject; EIGEN_DEVICE_FUNC - inline SelfAdjointView(MatrixType& matrix) : m_matrix(matrix) + explicit inline SelfAdjointView(MatrixType& matrix) : m_matrix(matrix) {} EIGEN_DEVICE_FUNC @@ -258,7 +258,7 @@ template typename MatrixBase::template ConstSelfAdjointViewReturnType::Type MatrixBase::selfadjointView() const { - return derived(); + return typename ConstSelfAdjointViewReturnType::Type(derived()); } template @@ -266,7 +266,7 @@ template typename MatrixBase::template SelfAdjointViewReturnType::Type MatrixBase::selfadjointView() { - return derived(); + return typename SelfAdjointViewReturnType::Type(derived()); } } // end namespace Eigen -- cgit v1.2.3