aboutsummaryrefslogtreecommitdiffhomepage
path: root/Eigen/src/Core/Transpositions.h
diff options
context:
space:
mode:
authorGravatar Christoph Hertzberg <chtz@informatik.uni-bremen.de>2014-09-23 14:28:23 +0200
committerGravatar Christoph Hertzberg <chtz@informatik.uni-bremen.de>2014-09-23 14:28:23 +0200
commit36448c9e287935b8c408791bf88b2907292d6c80 (patch)
tree841afdf4ea165433ad3b0f797498441815344eeb /Eigen/src/Core/Transpositions.h
parentde0d8a010e8cee66901786e0e2819beeaa5cb253 (diff)
Make constructors explicit if they could lead to unintended implicit conversion
Diffstat (limited to 'Eigen/src/Core/Transpositions.h')
-rw-r--r--Eigen/src/Core/Transpositions.h6
1 files changed, 3 insertions, 3 deletions
diff --git a/Eigen/src/Core/Transpositions.h b/Eigen/src/Core/Transpositions.h
index 92261118f..77e7d6f45 100644
--- a/Eigen/src/Core/Transpositions.h
+++ b/Eigen/src/Core/Transpositions.h
@@ -240,7 +240,7 @@ class Map<Transpositions<SizeAtCompileTime,MaxSizeAtCompileTime,_StorageIndexTyp
typedef typename IndicesType::Scalar StorageIndexType;
typedef typename IndicesType::Index Index;
- inline Map(const StorageIndexType* indicesPtr)
+ explicit inline Map(const StorageIndexType* indicesPtr)
: m_indices(indicesPtr)
{}
@@ -299,7 +299,7 @@ class TranspositionsWrapper
typedef typename IndicesType::Scalar StorageIndexType;
typedef typename IndicesType::Index Index;
- inline TranspositionsWrapper(IndicesType& a_indices)
+ explicit inline TranspositionsWrapper(IndicesType& a_indices)
: m_indices(a_indices)
{}
@@ -414,7 +414,7 @@ class Transpose<TranspositionsBase<TranspositionsDerived> >
typedef typename TranspositionType::IndicesType IndicesType;
public:
- Transpose(const TranspositionType& t) : m_transpositions(t) {}
+ explicit Transpose(const TranspositionType& t) : m_transpositions(t) {}
inline int size() const { return m_transpositions.size(); }