Fix various small issues detected by gcc

This commit is contained in:
Gael Guennebaud 2014-08-01 16:24:23 +02:00
parent c2ff44cbf3
commit 107bb308c3
5 changed files with 8 additions and 8 deletions

View File

@ -965,7 +965,7 @@ struct evaluator<PartialReduxExpr<ArgType, MemberOp, Direction> >
typedef PartialReduxExpr<ArgType, MemberOp, Direction> XprType;
typedef typename XprType::Scalar InputScalar;
enum {
TraversalSize = Direction==Vertical ? ArgType::RowsAtCompileTime : XprType::ColsAtCompileTime
TraversalSize = Direction==int(Vertical) ? int(ArgType::RowsAtCompileTime) : int(XprType::ColsAtCompileTime)
};
typedef typename MemberOp::template Cost<InputScalar,int(TraversalSize)> CostOpType;
enum {

View File

@ -375,7 +375,7 @@ public:
#endif
#ifdef EIGEN_TEST_EVALUATORS
Index rows() const { return Mode==Projective ? m_matrix.cols() : m_matrix.cols()-1; }
Index rows() const { return int(Mode)==int(Projective) ? m_matrix.cols() : (m_matrix.cols()-1); }
Index cols() const { return m_matrix.cols(); }
#endif

View File

@ -577,7 +577,7 @@ namespace internal {
#ifdef EIGEN_TEST_EVALUATORS
//
template<typename ArgType, int BlockRows, int BlockCols, int InnerPanel>
template<typename ArgType, int BlockRows, int BlockCols, bool InnerPanel>
struct unary_evaluator<Block<ArgType,BlockRows,BlockCols,InnerPanel>, IteratorBased >
: public evaluator_base<Block<ArgType,BlockRows,BlockCols,InnerPanel> >
{
@ -615,7 +615,7 @@ struct unary_evaluator<Block<ArgType,BlockRows,BlockCols,InnerPanel>, IteratorBa
const XprType &m_block;
};
template<typename ArgType, int BlockRows, int BlockCols, int InnerPanel>
template<typename ArgType, int BlockRows, int BlockCols, bool InnerPanel>
class unary_evaluator<Block<ArgType,BlockRows,BlockCols,InnerPanel>, IteratorBased>::InnerVectorInnerIterator
: public EvalIterator
{
@ -640,7 +640,7 @@ public:
inline operator bool() const { return EvalIterator::operator bool() && EvalIterator::index() < m_end; }
};
template<typename ArgType, int BlockRows, int BlockCols, int InnerPanel>
template<typename ArgType, int BlockRows, int BlockCols, bool InnerPanel>
class unary_evaluator<Block<ArgType,BlockRows,BlockCols,InnerPanel>, IteratorBased>::OuterVectorInnerIterator
{
const unary_evaluator& m_eval;

View File

@ -200,7 +200,7 @@ public:
public:
EIGEN_STRONG_INLINE InnerIterator(const unary_evaluator& xprEval, Index outer)
: Base(xprEval.m_argImpl,outer)
: Base(xprEval.m_argImpl,outer), m_returnOne(false)
{
if(SkipFirst)
{

View File

@ -447,7 +447,7 @@ void SparseQR<MatrixType,OrderingType>::factorize(const MatrixType& mat)
}
} // End update current column
Scalar tau;
Scalar tau = 0;
RealScalar beta = 0;
if(nonzeroCol < diagSize)