Add explicit assignment operator to fix GCC9 -Werror issues
Implicit assignment deprecated in C++14, and we use -Werror.
@@ -445,6 +445,11 @@ public:
vtype2() {};
vtype2(T p, T q) : x(p), y(q) {};
vtype2(const vtype2 & p) : x(p.x), y(p.y) {};
+ vtype2 &operator =(const vtype2 &s) {
+ this->x = s.x;
+ this->y = s.y;
+ return *this;
+ }
};
template <typename T> class vtype3
@@ -454,6 +459,12 @@ public:
vtype3() {};
vtype3(T p, T q, T r) : x(p), y(q), z(r) {};
vtype3(const vtype3 & p) : x(p.x), y(p.y), z(p.z) {};
+ vtype3 &operator =(const vtype3 &s) {
+ this->x = s.x;
+ this->y = s.y;
+ this->z = s.z;
+ return *this;
+ }
};
template <typename T> class vtype4
@@ -463,6 +474,13 @@ public:
vtype4() {};
vtype4(T p, T q, T r, T s) : x(p), y(q), z(r), w(s) {};
vtype4(const vtype4 & p) : x(p.x), y(p.y), z(p.z), w(p.w) {};
+ vtype4 &operator =(const vtype4 &s) {
+ this->x = s.x;
+ this->y = s.y;
+ this->z = s.z;
+ this->w = s.w;
+ return *this;
+ }
};
typedef vtype2<float> float2;
