Bug 1045091 - Fix some bad implicit constructors in gfx; r=Bas

This commit is contained in:
Ehsan Akhgari 2014-07-29 08:07:24 -04:00
parent 18a8f55541
commit 591ece972e
3 changed files with 4 additions and 4 deletions

View File

@ -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.

View File

@ -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)
{

View File

@ -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;