Defer the allocation of the working space:

- it is not always needed,
- and this fixes a long-to-float conversion warning
This commit is contained in:
Gael Guennebaud 2016-05-26 17:39:42 +02:00
parent e08f54e9eb
commit 30d97c03ce

View File

@ -304,7 +304,7 @@ template<typename VectorsType, typename CoeffsType, int Side> class HouseholderS
/** \internal */ /** \internal */
template<typename Dest> inline void applyThisOnTheLeft(Dest& dst) const template<typename Dest> inline void applyThisOnTheLeft(Dest& dst) const
{ {
Matrix<Scalar,1,Dest::ColsAtCompileTime,RowMajor,1,Dest::MaxColsAtCompileTime> workspace(dst.cols()); Matrix<Scalar,1,Dest::ColsAtCompileTime,RowMajor,1,Dest::MaxColsAtCompileTime> workspace;
applyThisOnTheLeft(dst, workspace); applyThisOnTheLeft(dst, workspace);
} }