Commit fd8b469e by Ivan Krasin Committed by Commit Bot

Fix dot() signature to avoid an implicit copy constructor call.

That also fixes the build with Clang ToT compiler. BUG=chromium:681912 Change-Id: I1449ee0f1f3f031d64af1a1f64f43808d2a8a1b1 Reviewed-on: https://chromium-review.googlesource.com/428903Reviewed-by: 's avatarJamie Madill <jmadill@chromium.org> Reviewed-by: 's avatarCorentin Wallez <cwallez@chromium.org> Commit-Queue: Jamie Madill <jmadill@chromium.org> Commit-Queue: Corentin Wallez <cwallez@chromium.org>
parent 47c27e82
...@@ -85,7 +85,7 @@ class VectorBase ...@@ -85,7 +85,7 @@ class VectorBase
// Other arithmetic operations // Other arithmetic operations
Type length() const; Type length() const;
Type lengthSquared() const; Type lengthSquared() const;
Type dot(const VectorN &other) const; Type dot(const VectorBase<Dimension, Type> &other) const;
VectorN normalized() const; VectorN normalized() const;
protected: protected:
...@@ -446,7 +446,7 @@ Type VectorBase<Dimension, Type>::lengthSquared() const ...@@ -446,7 +446,7 @@ Type VectorBase<Dimension, Type>::lengthSquared() const
} }
template <size_t Dimension, typename Type> template <size_t Dimension, typename Type>
Type VectorBase<Dimension, Type>::dot(const Vector<Dimension, Type> &other) const Type VectorBase<Dimension, Type>::dot(const VectorBase<Dimension, Type> &other) const
{ {
Type sum = Type(); Type sum = Type();
for (size_t i = 0; i < Dimension; ++i) for (size_t i = 0; i < Dimension; ++i)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment