From bdb1c72198f60fdd91460e26282134d43bc0e2df Mon Sep 17 00:00:00 2001 From: Pelin Kuran Date: Fri, 28 Feb 2020 17:14:00 +0300 Subject: tdf43157:Clean up OSL_ASSERT, DBG_ASSERT, etc.. Change-Id: Id93ebb5cb466580c25eb0e5669bc31510bdd7c1c Reviewed-on: https://gerrit.libreoffice.org/c/core/+/89717 Tested-by: Jenkins Reviewed-by: Michael Stahl --- basegfx/source/polygon/b3dpolypolygontools.cxx | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-) diff --git a/basegfx/source/polygon/b3dpolypolygontools.cxx b/basegfx/source/polygon/b3dpolypolygontools.cxx index 31581a0be298..74b145957731 100644 --- a/basegfx/source/polygon/b3dpolypolygontools.cxx +++ b/basegfx/source/polygon/b3dpolypolygontools.cxx @@ -17,7 +17,6 @@ * the License at http://www.apache.org/licenses/LICENSE-2.0 . */ -#include #include #include #include @@ -27,6 +26,7 @@ #include #include #include +#include // predefines #define nMinSegments sal_uInt32(1) @@ -470,9 +470,11 @@ namespace basegfx::utils if(nOuterSequenceCount) { - OSL_ENSURE(nOuterSequenceCount == rPolyPolygonShape3DSource.SequenceY.getLength() - && nOuterSequenceCount == rPolyPolygonShape3DSource.SequenceZ.getLength(), - "UnoPolyPolygonShape3DToB3DPolygon: Not all double sequences have the same length (!)"); + assert(nOuterSequenceCount == rPolyPolygonShape3DSource.SequenceY.getLength() + && nOuterSequenceCount + == rPolyPolygonShape3DSource.SequenceZ.getLength()&& + "UnoPolyPolygonShape3DToB3DPolygon: Not all double sequences have the same " + "length (!)" ); const css::drawing::DoubleSequence* pInnerSequenceX = rPolyPolygonShape3DSource.SequenceX.getConstArray(); const css::drawing::DoubleSequence* pInnerSequenceY = rPolyPolygonShape3DSource.SequenceY.getConstArray(); @@ -482,9 +484,10 @@ namespace basegfx::utils { basegfx::B3DPolygon aNewPolygon; const sal_Int32 nInnerSequenceCount(pInnerSequenceX->getLength()); - OSL_ENSURE(nInnerSequenceCount == pInnerSequenceY->getLength() - && nInnerSequenceCount == pInnerSequenceZ->getLength(), - "UnoPolyPolygonShape3DToB3DPolygon: Not all double sequences have the same length (!)"); + assert(nInnerSequenceCount == pInnerSequenceY->getLength() + && nInnerSequenceCount == pInnerSequenceZ->getLength() + && "UnoPolyPolygonShape3DToB3DPolygon: Not all double sequences have " + "the same length (!)"); const double* pArrayX = pInnerSequenceX->getConstArray(); const double* pArrayY = pInnerSequenceY->getConstArray(); -- cgit v1.2.3