From 4b6c66daa8a4865bd7e3350c4a0307575d2aff63 Mon Sep 17 00:00:00 2001 From: Takeshi Abe Date: Tue, 6 Dec 2016 11:55:48 +0900 Subject: starmath: Require that they are non-0 vectors Otherwise, division by zero would happen. Change-Id: I77fde7da87f32ba530482e80623bb449313cf986 Reviewed-on: https://gerrit.libreoffice.org/31670 Tested-by: Jenkins Reviewed-by: Takeshi Abe --- starmath/source/node.cxx | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'starmath') diff --git a/starmath/source/node.cxx b/starmath/source/node.cxx index a37236db4224..e941c2d49e30 100644 --- a/starmath/source/node.cxx +++ b/starmath/source/node.cxx @@ -903,7 +903,7 @@ double Det(const Point &rHeading1, const Point &rHeading2) bool IsPointInLine(const Point &rPoint1, const Point &rPoint2, const Point &rHeading2) { - OSL_ENSURE(rHeading2 != Point(), "Sm : 0 vector"); + assert(rHeading2 != Point()); bool bRes = false; static const double eps = 5.0 * DBL_EPSILON; @@ -928,8 +928,8 @@ sal_uInt16 GetLineIntersectionPoint(Point &rResult, const Point& rPoint1, const Point &rHeading1, const Point& rPoint2, const Point &rHeading2) { - OSL_ENSURE(rHeading1 != Point(), "Sm : 0 vector"); - OSL_ENSURE(rHeading2 != Point(), "Sm : 0 vector"); + assert(rHeading1 != Point()); + assert(rHeading2 != Point()); sal_uInt16 nRes = 1; static const double eps = 5.0 * DBL_EPSILON; -- cgit