From c64ca6870ea3f76b5ea5182bba1e62fd5a632f89 Mon Sep 17 00:00:00 2001 From: Benoit Jacob Date: Sat, 31 Oct 2009 11:49:20 -0400 Subject: [PATCH] this explicit keyword can't hurt --- Eigen/src/Core/MatrixBase.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Eigen/src/Core/MatrixBase.h b/Eigen/src/Core/MatrixBase.h index 73befb35e..f88d5939f 100644 --- a/Eigen/src/Core/MatrixBase.h +++ b/Eigen/src/Core/MatrixBase.h @@ -159,7 +159,7 @@ template class MatrixBase inline int size() const { return rows() * cols(); } /** \returns the number of nonzero coefficients which is in practice the number * of stored coefficients. */ - inline int nonZeros() const { return size(); } + inline int nonZeros() const { return derived.nonZeros(); } /** \returns true if either the number of rows or the number of columns is equal to 1. * In other words, this function returns * \code rows()==1 || cols()==1 \endcode @@ -636,7 +636,7 @@ template class MatrixBase } private: - MatrixBase(int); + explicit MatrixBase(int); MatrixBase(int,int); template explicit MatrixBase(const MatrixBase&); };