mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-25 13:51:41 +00:00
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:
parent
3033ee4b0e
commit
2072d3a612
@ -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*(
|
||||
|
Loading…
Reference in New Issue
Block a user