diff --git a/gfx/2d/BaseMargin.h b/gfx/2d/BaseMargin.h index 33afd465856a..a0dcb26bb2a7 100644 --- a/gfx/2d/BaseMargin.h +++ b/gfx/2d/BaseMargin.h @@ -89,11 +89,11 @@ struct BaseMargin { T& Side(SideT aSide) { // This is ugly! - return *(&top + T(aSide)); + return *(&top + int(aSide)); } T Side(SideT aSide) const { // This is ugly! - return *(&top + T(aSide)); + return *(&top + int(aSide)); } void ApplySkipSides(Sides aSkipSides)