diff options
author | 2015-03-28 12:36:24 +0100 | |
---|---|---|
committer | 2015-03-28 12:36:24 +0100 | |
commit | 09a5361d1ba1cc545739f72188d01a7ee781a48d (patch) | |
tree | 863f251cc57f803ec217cb60f95b45231955dff0 /Eigen/src/Geometry/Quaternion.h | |
parent | 266a84558fe204d561df3071e280731d80e5fe4c (diff) |
bug #983: Pass Vector3 by const reference and not by value
Diffstat (limited to 'Eigen/src/Geometry/Quaternion.h')
-rw-r--r-- | Eigen/src/Geometry/Quaternion.h | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/Eigen/src/Geometry/Quaternion.h b/Eigen/src/Geometry/Quaternion.h index e90ce77eb..e5ece3323 100644 --- a/Eigen/src/Geometry/Quaternion.h +++ b/Eigen/src/Geometry/Quaternion.h @@ -162,7 +162,7 @@ class QuaternionBase : public RotationBase<Derived, 3> { return coeffs().isApprox(other.coeffs(), prec); } /** return the result vector of \a v through the rotation*/ - EIGEN_STRONG_INLINE Vector3 _transformVector(Vector3 v) const; + EIGEN_STRONG_INLINE Vector3 _transformVector(const Vector3& v) const; /** \returns \c *this with scalar type casted to \a NewScalarType * @@ -462,7 +462,7 @@ EIGEN_STRONG_INLINE Derived& QuaternionBase<Derived>::operator*= (const Quaterni */ template <class Derived> EIGEN_STRONG_INLINE typename QuaternionBase<Derived>::Vector3 -QuaternionBase<Derived>::_transformVector(Vector3 v) const +QuaternionBase<Derived>::_transformVector(const Vector3& v) const { // Note that this algorithm comes from the optimization by hand // of the conversion to a Matrix followed by a Matrix/Vector product. |