From 131e5a1a4a50b11b386dd8aa3408d3baa1e9d1b5 Mon Sep 17 00:00:00 2001 From: Christoph Hertzberg Date: Wed, 11 May 2016 23:50:13 +0200 Subject: Do not copy for trivial 1x1 case. This also avoids a "maybe-uninitialized" warning in some situations. --- Eigen/src/Core/SolveTriangular.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'Eigen/src/Core/SolveTriangular.h') diff --git a/Eigen/src/Core/SolveTriangular.h b/Eigen/src/Core/SolveTriangular.h index a33356423..96d3dde50 100644 --- a/Eigen/src/Core/SolveTriangular.h +++ b/Eigen/src/Core/SolveTriangular.h @@ -169,7 +169,7 @@ void TriangularViewImpl::solveInPlace(const MatrixBase::Flags & RowMajorBit && OtherDerived::IsVectorAtCompileTime }; + enum { copy = (internal::traits::Flags & RowMajorBit) && OtherDerived::IsVectorAtCompileTime && OtherDerived::SizeAtCompileTime!=1}; typedef typename internal::conditional::type, OtherDerived&>::type OtherCopy; OtherCopy otherCopy(other); -- cgit v1.2.3