[Libreoffice-commits] core.git: basegfx/source

Pelin Kuran (via logerrit) logerrit at kemper.freedesktop.org
Mon Mar 9 09:54:00 UTC 2020


 basegfx/source/polygon/b3dpolypolygontools.cxx |   17 ++++++++++-------
 1 file changed, 10 insertions(+), 7 deletions(-)

New commits:
commit bdb1c72198f60fdd91460e26282134d43bc0e2df
Author:     Pelin Kuran <pelinrkuran at gmail.com>
AuthorDate: Fri Feb 28 17:14:00 2020 +0300
Commit:     Michael Stahl <michael.stahl at cib.de>
CommitDate: Mon Mar 9 10:53:26 2020 +0100

    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 <michael.stahl at cib.de>

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 <osl/diagnose.h>
 #include <basegfx/polygon/b3dpolypolygontools.hxx>
 #include <basegfx/range/b3drange.hxx>
 #include <basegfx/polygon/b3dpolypolygon.hxx>
@@ -27,6 +26,7 @@
 #include <basegfx/numeric/ftools.hxx>
 #include <com/sun/star/drawing/DoubleSequence.hpp>
 #include <com/sun/star/drawing/PolyPolygonShape3D.hpp>
+#include <sal/log.hxx>
 
 // 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();


More information about the Libreoffice-commits mailing list