Ensure that (potentially aligned) stack objects are passed by reference.

This commit is contained in:
Hauke Heibel
2013-08-02 21:07:39 +02:00
parent 7c99b38b7c
commit 51b361b3bb
2 changed files with 35 additions and 6 deletions

View File

@@ -97,7 +97,7 @@ void testGeneral(const MatrixType& m, double tol)
}
template<typename MatrixType>
void testSingular(MatrixType m, double tol)
void testSingular(const MatrixType& m, double tol)
{
const int IsComplex = NumTraits<typename internal::traits<MatrixType>::Scalar>::IsComplex;
typedef typename internal::conditional<IsComplex, TriangularView<MatrixType,Upper>, const MatrixType&>::type TriangularType;
@@ -126,7 +126,7 @@ void testSingular(MatrixType m, double tol)
}
template<typename MatrixType>
void testLogThenExp(MatrixType m, double tol)
void testLogThenExp(const MatrixType& m, double tol)
{
typedef typename MatrixType::Scalar Scalar;
Scalar x;