diff --git a/src/Math/Matrix3.h b/src/Math/Matrix3.h index f54174700..c5b4d3959 100644 --- a/src/Math/Matrix3.h +++ b/src/Math/Matrix3.h @@ -68,7 +68,10 @@ template class Matrix3: public Matrix { inline constexpr Matrix3(const Matrix& other): Matrix(other) {} /** @copydoc Matrix::operator=() */ - inline constexpr Matrix3& operator=(const Matrix& other) { return Matrix::operator=(other); } + inline Matrix3& operator=(const Matrix& other) { + Matrix::operator=(other); + return *this; + } /** @copydoc Matrix::operator[](size_t) */ inline Vector3& operator[](size_t col) { return Vector3::from(Matrix::data()+col*3); } diff --git a/src/Math/Matrix4.h b/src/Math/Matrix4.h index d5f8bfc75..ba3d98c43 100644 --- a/src/Math/Matrix4.h +++ b/src/Math/Matrix4.h @@ -137,7 +137,10 @@ template class Matrix4: public Matrix { inline constexpr Matrix4(const Matrix& other): Matrix(other) {} /** @copydoc Matrix::operator=() */ - inline constexpr Matrix4& operator=(const Matrix& other) { return Matrix::operator=(other); } + inline Matrix4& operator=(const Matrix& other) { + Matrix::operator=(other); + return *this; + } /** @copydoc Matrix::operator[](size_t) */ inline Vector4& operator[](size_t col) { return Vector4::from(Matrix::data()+col*4); } diff --git a/src/Math/Vector2.h b/src/Math/Vector2.h index 1c1ef9d5a..145f54072 100644 --- a/src/Math/Vector2.h +++ b/src/Math/Vector2.h @@ -57,7 +57,10 @@ template class Vector2: public Vector { inline void setY(T value) { (*this)[1] = value; } /**< @brief Set Y component */ /** @copydoc Vector::operator=() */ - inline Vector2& operator=(const Vector& other) { return Vector::operator=(other); } + inline Vector2& operator=(const Vector& other) { + Vector::operator=(other); + return *this; + } /** @copydoc Vector::operator*(T) const */ inline Vector2 operator*(T number) const { return Vector::operator*(number); } diff --git a/src/Math/Vector3.h b/src/Math/Vector3.h index 8e97269f7..148f6d055 100644 --- a/src/Math/Vector3.h +++ b/src/Math/Vector3.h @@ -91,7 +91,10 @@ template class Vector3: public Vector { inline void setB(T value) { setZ(value); } /**< @brief Set B component */ /** @copydoc Vector::operator=() */ - inline Vector3& operator=(const Vector& other) { return Vector::operator=(other); } + inline Vector3& operator=(const Vector& other) { + Vector::operator=(other); + return *this; + } /** @copydoc Vector::operator*(T) const */ inline Vector3 operator*(T number) const { return Vector::operator*(number); } diff --git a/src/Math/Vector4.h b/src/Math/Vector4.h index d95cc6e05..0027db695 100644 --- a/src/Math/Vector4.h +++ b/src/Math/Vector4.h @@ -99,7 +99,10 @@ template class Vector4: public Vector { inline constexpr Vector3 rgb() const { return xyz(); } /** @copydoc Vector::operator=() */ - inline Vector4& operator=(const Vector& other) { return Vector::operator=(other); } + inline Vector4& operator=(const Vector& other) { + Vector::operator=(other); + return *this; + } /** @copydoc Vector::operator*(T) const */ inline Vector4 operator*(T number) const { return Vector::operator*(number); }