From 84289a2ba996b41815f148f27aecc52a7864066d Mon Sep 17 00:00:00 2001 From: peterbell10 Date: Sun, 10 May 2020 17:16:49 +0100 Subject: Cleanup some workarounds and warnings (#4735) * Cleanup thread_local usage in FastRandom * Use constexpr to avoid clang warning * Fix more Wglobal-constructor warnings * Make MSVC happy? --- src/Vector3.h | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) (limited to 'src/Vector3.h') diff --git a/src/Vector3.h b/src/Vector3.h index 4445c6336..05c9c66de 100644 --- a/src/Vector3.h +++ b/src/Vector3.h @@ -17,8 +17,8 @@ public: T x, y, z; - inline Vector3(void) : x(0), y(0), z(0) {} - inline Vector3(T a_x, T a_y, T a_z) : x(a_x), y(a_y), z(a_z) {} + constexpr Vector3(void) : x(0), y(0), z(0) {} + constexpr Vector3(T a_x, T a_y, T a_z) : x(a_x), y(a_y), z(a_z) {} #ifdef TOLUA_EXPOSITION // Hardcoded copy constructors (tolua++ does not support function templates .. yet) @@ -31,7 +31,12 @@ public: // tolua_end // Conversion constructors where U is not the same as T leaving the copy-constructor implicitly generated template ::value>::type> - Vector3(const Vector3 & a_Rhs): x(static_cast(a_Rhs.x)), y(static_cast(a_Rhs.y)), z(static_cast(a_Rhs.z)) {} + constexpr Vector3(const Vector3 & a_Rhs): + x(static_cast(a_Rhs.x)), + y(static_cast(a_Rhs.y)), + z(static_cast(a_Rhs.z)) + { + } // tolua_begin inline void Set(T a_x, T a_y, T a_z) -- cgit v1.2.3