Fix Wimplicit-int-float-conversion warnings with clang 10+

This is a new warning in clang which will be available in clang 10
onwards

Fixes
error: implicit conversion from 'const int' to 'float' may lose precision [-Werror,-Wimplicit-int-float-conversion]
This commit is contained in:
Khem Raj
2019-12-27 18:42:51 -08:00
parent 8828c3f1fd
commit d2b9bbb911
2 changed files with 17 additions and 17 deletions

View File

@@ -54,7 +54,7 @@ namespace glm
template<typename T> \
return_type_scalar_multiplication<T, Vec> \
operator/(Vec lh, T const& s){ \
return lh *= 1.0f / s; \
return lh *= 1.0f / static_cast<float>(s); \
}
GLM_IMPLEMENT_SCAL_MULT(vec2)