From 6b1ec838aa1d259ff448e72e92c52201967f0a40 Mon Sep 17 00:00:00 2001 From: Lioncash <mathew1800@gmail.com> Date: Tue, 7 Aug 2018 14:15:56 -0400 Subject: [PATCH] vector_math: Convert typedefs to type aliases --- src/common/vector_math.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/common/vector_math.h b/src/common/vector_math.h index 1d7ea14da..19623e971 100644 --- a/src/common/vector_math.h +++ b/src/common/vector_math.h @@ -184,7 +184,7 @@ Vec2<T> operator*(const V& f, const Vec2<T>& vec) { return Vec2<T>(f * vec.x, f * vec.y); } -typedef Vec2<float> Vec2f; +using Vec2f = Vec2<float>; template <> inline float Vec2<float>::Length() const { @@ -406,7 +406,7 @@ inline float Vec3<float>::Normalize() { return length; } -typedef Vec3<float> Vec3f; +using Vec3f = Vec3<float>; template <typename T> class Vec4 { @@ -613,7 +613,7 @@ Vec4<decltype(V{} * T{})> operator*(const V& f, const Vec4<T>& vec) { return MakeVec(f * vec.x, f * vec.y, f * vec.z, f * vec.w); } -typedef Vec4<float> Vec4f; +using Vec4f = Vec4<float>; template <typename T> static inline decltype(T{} * T{} + T{} * T{}) Dot(const Vec2<T>& a, const Vec2<T>& b) {