diff --git a/Eigen/src/Core/AnyMatrixBase.h b/Eigen/src/Core/AnyMatrixBase.h index cc2f4157c..e56b56deb 100644 --- a/Eigen/src/Core/AnyMatrixBase.h +++ b/Eigen/src/Core/AnyMatrixBase.h @@ -61,8 +61,7 @@ template struct AnyMatrixBase { // This is the default implementation, // derived class can reimplement it in a more optimized way. - typename Dest::PlainMatrixType res(rows(),cols()); - evalTo(res); + typename Dest::PlainMatrixType res(*this); dst += res; } @@ -71,8 +70,7 @@ template struct AnyMatrixBase { // This is the default implementation, // derived class can reimplement it in a more optimized way. - typename Dest::PlainMatrixType res(rows(),cols()); - evalTo(res); + typename Dest::PlainMatrixType res(*this); dst -= res; }