зеркало из https://github.com/mozilla/gecko-dev.git
Bug 723864 - Remove dead default cases in gfx. r=jmuizelaar.
This commit is contained in:
Родитель
10fe365fe0
Коммит
a040b157ec
|
@ -122,9 +122,8 @@ inline gfxContext::GraphicsLineCap ThebesLineCap(CapStyle aStyle)
|
|||
return gfxContext::LINE_CAP_ROUND;
|
||||
case CAP_SQUARE:
|
||||
return gfxContext::LINE_CAP_SQUARE;
|
||||
default:
|
||||
return gfxContext::LINE_CAP_BUTT;
|
||||
}
|
||||
MOZ_NOT_REACHED("Incomplete switch");
|
||||
}
|
||||
|
||||
inline CapStyle ToCapStyle(gfxContext::GraphicsLineCap aStyle)
|
||||
|
@ -136,9 +135,8 @@ inline CapStyle ToCapStyle(gfxContext::GraphicsLineCap aStyle)
|
|||
return CAP_ROUND;
|
||||
case gfxContext::LINE_CAP_SQUARE:
|
||||
return CAP_SQUARE;
|
||||
default:
|
||||
return CAP_BUTT;
|
||||
}
|
||||
MOZ_NOT_REACHED("Incomplete switch");
|
||||
}
|
||||
|
||||
inline gfxContext::GraphicsLineJoin ThebesLineJoin(JoinStyle aStyle)
|
||||
|
@ -164,9 +162,8 @@ inline JoinStyle ToJoinStyle(gfxContext::GraphicsLineJoin aStyle)
|
|||
return JOIN_BEVEL;
|
||||
case gfxContext::LINE_JOIN_ROUND:
|
||||
return JOIN_ROUND;
|
||||
default:
|
||||
return JOIN_MITER;
|
||||
}
|
||||
MOZ_NOT_REACHED("Incomplete switch");
|
||||
}
|
||||
|
||||
inline gfxMatrix ThebesMatrix(const Matrix &aMatrix)
|
||||
|
|
|
@ -160,10 +160,8 @@ GetBackendName(mozilla::gfx::BackendType aBackend)
|
|||
return "skia";
|
||||
case mozilla::gfx::BACKEND_NONE:
|
||||
return "none";
|
||||
default:
|
||||
NS_ERROR("Invalid backend type!");
|
||||
return "";
|
||||
}
|
||||
MOZ_NOT_REACHED("Incomplet switch");
|
||||
}
|
||||
|
||||
class THEBES_API gfxPlatform {
|
||||
|
|
|
@ -45,6 +45,7 @@
|
|||
#include "nsDebug.h"
|
||||
#include "mozilla/gfx/BaseMargin.h"
|
||||
#include "mozilla/gfx/BaseRect.h"
|
||||
#include "mozilla/Assertions.h"
|
||||
#include "nsRect.h"
|
||||
|
||||
struct gfxMargin : public mozilla::gfx::BaseMargin<gfxFloat, gfxMargin> {
|
||||
|
@ -126,11 +127,8 @@ struct THEBES_API gfxRect :
|
|||
case NS_SIDE_RIGHT: return TopRight();
|
||||
case NS_SIDE_BOTTOM: return BottomRight();
|
||||
case NS_SIDE_LEFT: return BottomLeft();
|
||||
default:
|
||||
NS_ERROR("Invalid side!");
|
||||
break;
|
||||
}
|
||||
return gfxPoint(0.0, 0.0);
|
||||
MOZ_NOT_REACHED("Incomplet switch");
|
||||
}
|
||||
|
||||
gfxPoint CWCorner(mozilla::css::Side side) const {
|
||||
|
@ -139,11 +137,8 @@ struct THEBES_API gfxRect :
|
|||
case NS_SIDE_RIGHT: return BottomRight();
|
||||
case NS_SIDE_BOTTOM: return BottomLeft();
|
||||
case NS_SIDE_LEFT: return TopLeft();
|
||||
default:
|
||||
NS_ERROR("Invalid side!");
|
||||
break;
|
||||
}
|
||||
return gfxPoint(0.0, 0.0);
|
||||
MOZ_NOT_REACHED("Incomplet switch");
|
||||
}
|
||||
|
||||
/* Conditions this border to Cairo's max coordinate space.
|
||||
|
|
Загрузка…
Ссылка в новой задаче