Fix compilation for gcc-11

In response to #9557
This commit is contained in:
Nekotekina 2021-01-09 14:38:01 +03:00
parent a36f25c7b2
commit 9d74d42f2a

View file

@ -83,28 +83,28 @@ struct vector3_base : public position3_base<T>
{ {
using position3_base<T>::position3_base; using position3_base<T>::position3_base;
vector3_base<T>(T x, T y, T z) vector3_base(T x, T y, T z)
{ {
this->x = x; this->x = x;
this->y = y; this->y = y;
this->z = z; this->z = z;
} }
vector3_base<T>(const position3_base<T>& other) vector3_base(const position3_base<T>& other)
{ {
this->x = other.x; this->x = other.x;
this->y = other.y; this->y = other.y;
this->z = other.z; this->z = other.z;
} }
T dot(const vector3_base<T>& rhs) const T dot(const vector3_base& rhs) const
{ {
return (this->x * rhs.x) + (this->y * rhs.y) + (this->z * rhs.z); return (this->x * rhs.x) + (this->y * rhs.y) + (this->z * rhs.z);
} }
T distance(const vector3_base<T>& rhs) const T distance(const vector3_base& rhs) const
{ {
const vector3_base<T> d = *this - rhs; const vector3_base d = *this - rhs;
return d.dot(d); return d.dot(d);
} }
}; };