starmath/source/node.cxx | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-)
New commits: commit 4b6c66daa8a4865bd7e3350c4a0307575d2aff63 Author: Takeshi Abe <t...@fixedpoint.jp> Date: Tue Dec 6 11:55:48 2016 +0900 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 <c...@libreoffice.org> Reviewed-by: Takeshi Abe <t...@fixedpoint.jp> diff --git a/starmath/source/node.cxx b/starmath/source/node.cxx index a37236d..e941c2d 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; _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits