Bug 1711834 - Let the compiler generate the Matrix4x4Typed copy assignment operator. r=mattwoodrow

This avoids GCC complaining about the case where doing `m = m` would
memcpy from an address onto itself.

Differential Revision: https://phabricator.services.mozilla.com/D115460
This commit is contained in:
Mike Hommey 2021-05-24 20:58:11 +00:00
parent 3033ee4b0e
commit 2072d3a612

View File

@ -1158,10 +1158,7 @@ class Matrix4x4Typed {
bool operator!=(const Matrix4x4Typed& o) const { return !((*this) == o); }
Matrix4x4Typed& operator=(const Matrix4x4Typed& aOther) {
memcpy(components, aOther.components, sizeof(components));
return *this;
}
Matrix4x4Typed& operator=(const Matrix4x4Typed& aOther) = default;
template <typename NewTargetUnits>
Matrix4x4Typed<SourceUnits, NewTargetUnits, T> operator*(