diff --git a/glm/detail/type_vec4.inl b/glm/detail/type_vec4.inl index 8533e516..e4c331d8 100644 --- a/glm/detail/type_vec4.inl +++ b/glm/detail/type_vec4.inl @@ -830,51 +830,31 @@ namespace detail template GLM_FUNC_QUALIFIER tvec4 operator|(tvec4 const & v, T scalar) { - return tvec4( - v.x | scalar, - v.y | scalar, - v.z | scalar, - v.w | scalar); + return tvec4(v) |= scalar; } template - GLM_FUNC_QUALIFIER tvec4 operator|(tvec4 const & v, tvec1 const & scalar) + GLM_FUNC_QUALIFIER tvec4 operator|(tvec4 const & v1, tvec1 const & v2) { - return tvec4( - v.x | scalar.x, - v.y | scalar.x, - v.z | scalar.x, - v.w | scalar.x); + return tvec4(v1) |= v2; } template GLM_FUNC_QUALIFIER tvec4 operator|(T scalar, tvec4 const & v) { - return tvec4( - scalar | v.x, - scalar | v.y, - scalar | v.z, - scalar | v.w); + return tvec4(scalar) |= v; } template - GLM_FUNC_QUALIFIER tvec4 operator|(tvec1 const & scalar, tvec4 const & v) + GLM_FUNC_QUALIFIER tvec4 operator|(tvec1 const & v1, tvec4 const & v2) { - return tvec4( - scalar.x | v.x, - scalar.x | v.y, - scalar.x | v.z, - scalar.x | v.w); + return tvec4(v1.x) |= v2; } template GLM_FUNC_QUALIFIER tvec4 operator|(tvec4 const & v1, tvec4 const & v2) { - return tvec4( - v1.x | v2.x, - v1.y | v2.y, - v1.z | v2.z, - v1.w | v2.w); + return tvec4(v1) |= v2; } template