mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-30 08:12:05 +00:00
Bug 1045091 - Fix some bad implicit constructors in gfx; r=Bas
This commit is contained in:
parent
18a8f55541
commit
591ece972e
@ -67,7 +67,7 @@ struct PointTyped :
|
||||
|
||||
MOZ_CONSTEXPR PointTyped() : Super() {}
|
||||
MOZ_CONSTEXPR PointTyped(Float aX, Float aY) : Super(aX, aY) {}
|
||||
MOZ_CONSTEXPR PointTyped(const IntPointTyped<units>& point) : Super(float(point.x), float(point.y)) {}
|
||||
MOZ_CONSTEXPR MOZ_IMPLICIT PointTyped(const IntPointTyped<units>& point) : Super(float(point.x), float(point.y)) {}
|
||||
|
||||
// XXX When all of the code is ported, the following functions to convert to and from
|
||||
// unknown types should be removed.
|
||||
|
@ -103,7 +103,7 @@ struct AlignedArray
|
||||
{
|
||||
}
|
||||
|
||||
MOZ_ALWAYS_INLINE AlignedArray(size_t aCount)
|
||||
explicit MOZ_ALWAYS_INLINE AlignedArray(size_t aCount)
|
||||
: mStorage(nullptr)
|
||||
, mCount(0)
|
||||
{
|
||||
|
@ -19,7 +19,7 @@ struct gfxSize : public mozilla::gfx::BaseSize<gfxFloat, gfxSize> {
|
||||
|
||||
gfxSize() : Super() {}
|
||||
gfxSize(gfxFloat aWidth, gfxFloat aHeight) : Super(aWidth, aHeight) {}
|
||||
gfxSize(const nsIntSize& aSize) : Super(aSize.width, aSize.height) {}
|
||||
MOZ_IMPLICIT gfxSize(const nsIntSize& aSize) : Super(aSize.width, aSize.height) {}
|
||||
};
|
||||
|
||||
struct gfxPoint : public mozilla::gfx::BasePoint<gfxFloat, gfxPoint> {
|
||||
@ -27,7 +27,7 @@ struct gfxPoint : public mozilla::gfx::BasePoint<gfxFloat, gfxPoint> {
|
||||
|
||||
gfxPoint() : Super() {}
|
||||
gfxPoint(gfxFloat aX, gfxFloat aY) : Super(aX, aY) {}
|
||||
gfxPoint(const nsIntPoint& aPoint) : Super(aPoint.x, aPoint.y) {}
|
||||
MOZ_IMPLICIT gfxPoint(const nsIntPoint& aPoint) : Super(aPoint.x, aPoint.y) {}
|
||||
|
||||
bool WithinEpsilonOf(const gfxPoint& aPoint, gfxFloat aEpsilon) {
|
||||
return fabs(aPoint.x - x) < aEpsilon && fabs(aPoint.y - y) < aEpsilon;
|
||||
|
Loading…
Reference in New Issue
Block a user