basegfx/source/polygon/b2dlinegeometry.cxx | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-)
New commits: commit 5291c3ef56948a91166a597033f3e48e00d57403 Author: Chris Sherlock <chris.sherloc...@gmail.com> AuthorDate: Sun Dec 1 05:41:43 2019 +1100 Commit: Bartosz Kosiorek <gan...@poczta.onet.pl> CommitDate: Tue Dec 10 20:25:41 2019 +0100 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 <gan...@poczta.onet.pl> Tested-by: Bartosz Kosiorek <gan...@poczta.onet.pl> 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; _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits