From a13ab958cbba75bc9abd1ca50f3030a10a75784e Mon Sep 17 00:00:00 2001
From: Huw Pascoe <huw.pascoe@gmail.com>
Date: Wed, 27 Sep 2017 00:26:09 +0100
Subject: Fixed type conversion ambiguity

---
 src/common/vector_math.h | 12 +++---------
 1 file changed, 3 insertions(+), 9 deletions(-)

(limited to 'src/common/vector_math.h')

diff --git a/src/common/vector_math.h b/src/common/vector_math.h
index 2b05f66eef..3f0057d9e5 100644
--- a/src/common/vector_math.h
+++ b/src/common/vector_math.h
@@ -104,8 +104,7 @@ public:
     }
     template <typename V>
     void operator*=(const V& f) {
-        x *= f;
-        y *= f;
+        *this = *this * f;
     }
     template <typename V>
     Vec2<decltype(T{} / V{})> operator/(const V& f) const {
@@ -262,9 +261,7 @@ public:
     }
     template <typename V>
     void operator*=(const V& f) {
-        x *= f;
-        y *= f;
-        z *= f;
+        *this = *this * f;
     }
     template <typename V>
     Vec3<decltype(T{} / V{})> operator/(const V& f) const {
@@ -478,10 +475,7 @@ public:
     }
     template <typename V>
     void operator*=(const V& f) {
-        x *= f;
-        y *= f;
-        z *= f;
-        w *= f;
+        *this = *this * f;
     }
     template <typename V>
     Vec4<decltype(T{} / V{})> operator/(const V& f) const {
-- 
cgit v1.2.3-70-g09d2