mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-09 03:15:11 +00:00
Bug 1603409 - add missing operator= definitions for gfx/2d classes; r=botond
These definitions are implicitly created now, but trunk clang considers implicit creation to be a bug when you have explicitly declared copy constructors. Differential Revision: https://phabricator.services.mozilla.com/D56970 --HG-- extra : moz-landing-system : lando
This commit is contained in:
parent
199786a364
commit
364d8de43e
@ -1196,6 +1196,11 @@ class Matrix4x4Typed {
|
||||
|
||||
bool operator!=(const Matrix4x4Typed& o) const { return !((*this) == o); }
|
||||
|
||||
Matrix4x4Typed& operator=(const Matrix4x4Typed& aOther) {
|
||||
memcpy(components, aOther.components, sizeof(components));
|
||||
return *this;
|
||||
}
|
||||
|
||||
template <typename NewTargetUnits>
|
||||
Matrix4x4Typed<SourceUnits, NewTargetUnits, T> operator*(
|
||||
const Matrix4x4Typed<TargetUnits, NewTargetUnits, T>& aMatrix) const {
|
||||
|
@ -36,6 +36,8 @@ struct ScaleFactor {
|
||||
|
||||
ScaleFactor<dst, src> Inverse() { return ScaleFactor<dst, src>(1 / scale); }
|
||||
|
||||
ScaleFactor<src, dst>& operator=(const ScaleFactor<src, dst>&) = default;
|
||||
|
||||
bool operator==(const ScaleFactor<src, dst>& aOther) const {
|
||||
return scale == aOther.scale;
|
||||
}
|
||||
|
@ -53,6 +53,8 @@ struct ScaleFactors2D {
|
||||
return ScaleFactor<src, dst>(xScale);
|
||||
}
|
||||
|
||||
ScaleFactors2D<src, dst>& operator=(const ScaleFactors2D<src, dst>&) = default;
|
||||
|
||||
bool operator==(const ScaleFactors2D<src, dst>& aOther) const {
|
||||
return xScale == aOther.xScale && yScale == aOther.yScale;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user