From 8ca73f192932b3b32aea8b2074f9548cc4283450 Mon Sep 17 00:00:00 2001 From: Alexander Harkness Date: Thu, 7 Nov 2024 20:10:44 +0000 Subject: Remove simple template-id from constructors for Vector3 template. (#5586) This was removed from the C++ standard in C++20; annoying warnings are produced by modern C++ compilers. https://www.open-std.org/jtc1/sc22/wg21/docs/cwg_defects.html#2237 --- src/Vector3.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Vector3.h b/src/Vector3.h index b48f35786..5df14b3ac 100644 --- a/src/Vector3.h +++ b/src/Vector3.h @@ -31,14 +31,14 @@ public: // tolua_end // Conversion constructors where U is not the same as T leaving the copy-constructor implicitly generated template ::value) && ((!std::is_integral::value) || (std::is_integral::value)), bool> = true> - constexpr Vector3(const Vector3 & a_Rhs): + constexpr Vector3(const Vector3 & a_Rhs): x(static_cast(a_Rhs.x)), y(static_cast(a_Rhs.y)), z(static_cast(a_Rhs.z)) { } template ::value) && ((std::is_integral::value) && (!std::is_integral::value)), bool> = true> - constexpr Vector3(const Vector3 & a_Rhs): + constexpr Vector3(const Vector3 & a_Rhs): x(static_cast(std::floor(a_Rhs.x))), y(static_cast(std::floor(a_Rhs.y))), z(static_cast(std::floor(a_Rhs.z))) -- cgit v1.2.3