Browse Source

Fix initialization of vector in convert_splat

When templating on types that don't have implicit constructors this fails
Francisco Facioni 1 month ago
parent
commit
36e7a9ad69
1 changed files with 1 additions and 1 deletions
  1. 1 1
      glm/detail/func_common.inl

+ 1 - 1
glm/detail/func_common.inl

@@ -322,7 +322,7 @@ namespace detail
 		template<int c>
 		template<int c>
 		GLM_FUNC_QUALIFIER GLM_CONSTEXPR static vec<L, T, Q> call(vec<L, T, Q> const& a)
 		GLM_FUNC_QUALIFIER GLM_CONSTEXPR static vec<L, T, Q> call(vec<L, T, Q> const& a)
 		{
 		{
-			vec<L, T, Q> v(0);
+			vec<L, T, Q> v(T(0));
 			for (int i = 0; i < L; ++i)
 			for (int i = 0; i < L; ++i)
 				v[i] = a[c];
 				v[i] = a[c];
 			return v;
 			return v;