summaryrefslogtreecommitdiff
path: root/basegfx
diff options
context:
space:
mode:
authorChris Sherlock <chris.sherlock79@gmail.com>2019-12-01 05:41:43 +1100
committerBartosz Kosiorek <gang65@poczta.onet.pl>2019-12-10 20:25:41 +0100
commit5291c3ef56948a91166a597033f3e48e00d57403 (patch)
tree7b150c27f12ac80cd0a813a551650f6856597105 /basegfx
parentaead2871f72d7e5d6e99b0f8cfefddcf101706a7 (diff)
tdf#43157 basegfx: remove OSL_ENSURE preconditions
The OSL_ENSUREs that I have converted to assert() are all preconditions - no function should ever have these values passed to it, so assert if this does happen so we know passed the values. Change-Id: I11b1141c8cac2fee7ffdd54d177ecc18e96a9620 Reviewed-on: https://gerrit.libreoffice.org/84140 Reviewed-by: Bartosz Kosiorek <gang65@poczta.onet.pl> Tested-by: Bartosz Kosiorek <gang65@poczta.onet.pl>
Diffstat (limited to 'basegfx')
-rw-r--r--basegfx/source/polygon/b2dlinegeometry.cxx12
1 files changed, 6 insertions, 6 deletions
diff --git a/basegfx/source/polygon/b2dlinegeometry.cxx b/basegfx/source/polygon/b2dlinegeometry.cxx
index ee55a0812141..190a413dfd00 100644
--- a/basegfx/source/polygon/b2dlinegeometry.cxx
+++ b/basegfx/source/polygon/b2dlinegeometry.cxx
@@ -46,10 +46,10 @@ namespace basegfx
double fShift)
{
B2DPolyPolygon aRetval;
- OSL_ENSURE(rCandidate.count() > 1, "createAreaGeometryForLineStartEnd: Line polygon has too less points (!)");
- OSL_ENSURE(rArrow.count() > 0, "createAreaGeometryForLineStartEnd: Empty arrow utils::PolyPolygon (!)");
- OSL_ENSURE(fWidth > 0.0, "createAreaGeometryForLineStartEnd: Width too small (!)");
- OSL_ENSURE(fDockingPosition >= 0.0 && fDockingPosition <= 1.0,
+ assert((rCandidate.count() > 1) && "createAreaGeometryForLineStartEnd: Line polygon has too less points (!)");
+ assert((rArrow.count() > 0) && "createAreaGeometryForLineStartEnd: Empty arrow utils::PolyPolygon (!)");
+ assert((fWidth > 0.0) && "createAreaGeometryForLineStartEnd: Width too small (!)");
+ assert((fDockingPosition >= 0.0 && fDockingPosition <= 1.0) &&
"createAreaGeometryForLineStartEnd: fDockingPosition out of range [0.0 .. 1.0] (!)");
if(fWidth < 0.0)
@@ -698,8 +698,8 @@ namespace basegfx
double fMiterMinimumAngle,
basegfx::triangulator::B2DTriangleVector* pTriangles)
{
- OSL_ENSURE(fHalfLineWidth > 0.0, "createAreaGeometryForJoin: LineWidth too small (!)");
- OSL_ENSURE(eJoin != B2DLineJoin::NONE, "createAreaGeometryForJoin: B2DLineJoin::NONE not allowed (!)");
+ assert((fHalfLineWidth > 0.0) && "createAreaGeometryForJoin: LineWidth too small (!)");
+ assert((eJoin != B2DLineJoin::NONE) && "createAreaGeometryForJoin: B2DLineJoin::NONE not allowed (!)");
// LineJoin from tangent rPerpendPrev to tangent rPerpendEdge in rPoint
B2DPolygon aEdgePolygon;