diff options
author | Clément Foucault <foucault.clem@gmail.com> | 2022-01-11 23:08:49 +0300 |
---|---|---|
committer | Clément Foucault <foucault.clem@gmail.com> | 2022-01-11 23:08:49 +0300 |
commit | a564817cb8b97d6ff68486791a3884912a185280 (patch) | |
tree | cfb36a68b325e0504ec73b6059eb3ab506d089e7 | |
parent | 4192ef4471709b685b8df7c9d8f0d3e479e6f18e (diff) |
Make mixed vec4 type constructor works with different vector types
-rw-r--r-- | source/blender/blenlib/BLI_math_vec_types.hh | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/source/blender/blenlib/BLI_math_vec_types.hh b/source/blender/blenlib/BLI_math_vec_types.hh index fd95acbe6bc..52aacd294e4 100644 --- a/source/blender/blenlib/BLI_math_vec_types.hh +++ b/source/blender/blenlib/BLI_math_vec_types.hh @@ -145,8 +145,8 @@ template<typename T, int Size> struct vec_base : public vec_struct_base<T, Size> { } - template<typename U, BLI_ENABLE_IF_VEC(Size, == 4)> - vec_base(vec_base<U, 2> xy, vec_base<U, 2> zw) + template<typename U, typename V, BLI_ENABLE_IF_VEC(Size, == 4)> + vec_base(vec_base<U, 2> xy, vec_base<V, 2> zw) : vec_base( static_cast<T>(xy.x), static_cast<T>(xy.y), static_cast<T>(zw.x), static_cast<T>(zw.y)) { |