Fix missing assignment operators in mtl::vecX
Assignment operators for taking base mtl::vec<> template were missing. This had the effect that an instance of mtl::vec2 could not be assigned an instance of mtl::vec<2>, for example.
This commit is contained in:
parent
7513280c73
commit
89b62078c5
@ -159,6 +159,11 @@ public:
|
|||||||
x = _x;
|
x = _x;
|
||||||
y = _y;
|
y = _y;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
constexpr vec2& operator=(const vec<2>& other) noexcept {
|
||||||
|
vec::operator=(other);
|
||||||
|
return *this;
|
||||||
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
class vec3 : public vec<3> {
|
class vec3 : public vec<3> {
|
||||||
@ -174,6 +179,11 @@ public:
|
|||||||
y = _y;
|
y = _y;
|
||||||
z = _z;
|
z = _z;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
constexpr vec3& operator=(const vec<3>& other) noexcept {
|
||||||
|
vec::operator=(other);
|
||||||
|
return *this;
|
||||||
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
class vec4 : public vec<4> {
|
class vec4 : public vec<4> {
|
||||||
@ -191,6 +201,11 @@ public:
|
|||||||
z = _z;
|
z = _z;
|
||||||
w = _w;
|
w = _w;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
constexpr vec4& operator=(const vec<4>& other) noexcept {
|
||||||
|
vec::operator=(other);
|
||||||
|
return *this;
|
||||||
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
template <typename STREAM_TYPE, size_t N>
|
template <typename STREAM_TYPE, size_t N>
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user