diff options
author | Christoph Hertzberg <chtz@informatik.uni-bremen.de> | 2014-09-23 14:28:23 +0200 |
---|---|---|
committer | Christoph Hertzberg <chtz@informatik.uni-bremen.de> | 2014-09-23 14:28:23 +0200 |
commit | 36448c9e287935b8c408791bf88b2907292d6c80 (patch) | |
tree | 841afdf4ea165433ad3b0f797498441815344eeb /Eigen/src/SparseCore/SparsePermutation.h | |
parent | de0d8a010e8cee66901786e0e2819beeaa5cb253 (diff) |
Make constructors explicit if they could lead to unintended implicit conversion
Diffstat (limited to 'Eigen/src/SparseCore/SparsePermutation.h')
-rw-r--r-- | Eigen/src/SparseCore/SparsePermutation.h | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/Eigen/src/SparseCore/SparsePermutation.h b/Eigen/src/SparseCore/SparsePermutation.h index 228796bf8..3bfa2ae1b 100644 --- a/Eigen/src/SparseCore/SparsePermutation.h +++ b/Eigen/src/SparseCore/SparsePermutation.h @@ -166,7 +166,7 @@ struct product_evaluator<Product<Lhs, Rhs, DefaultProduct>, ProductTag, Permutat typedef typename traits<permut_sparsematrix_product_retval<Lhs,Rhs,OnTheRight,false> >::ReturnType PlainObject; typedef typename evaluator<PlainObject>::type Base; - product_evaluator(const XprType& xpr) + explicit product_evaluator(const XprType& xpr) : m_result(xpr.rows(), xpr.cols()) { ::new (static_cast<Base*>(this)) Base(m_result); @@ -185,7 +185,7 @@ struct product_evaluator<Product<Lhs, Rhs, DefaultProduct>, ProductTag, SparseSh typedef typename traits<permut_sparsematrix_product_retval<Rhs,Lhs,OnTheRight,false> >::ReturnType PlainObject; typedef typename evaluator<PlainObject>::type Base; - product_evaluator(const XprType& xpr) + explicit product_evaluator(const XprType& xpr) : m_result(xpr.rows(), xpr.cols()) { ::new (static_cast<Base*>(this)) Base(m_result); |