From 489f76fe8021d25e540fde532bafbadbc3f6e0bb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Kaj=20Gr=C3=B6nholm?= Date: Mon, 15 Jul 2024 08:40:26 +0300 Subject: Tweak curve renderer code Minor code improvements, mostly removing unnecessary code. Task-number: QTBUG-127121 Pick-to: 6.8 Change-Id: I57732969c06c441c3e1296dc7618e50f279e5bd1 Reviewed-by: Eirik Aavitsland --- src/quick/scenegraph/qsgcurveprocessor.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/quick/scenegraph/qsgcurveprocessor.cpp') diff --git a/src/quick/scenegraph/qsgcurveprocessor.cpp b/src/quick/scenegraph/qsgcurveprocessor.cpp index b647b9ffdf..e325756063 100644 --- a/src/quick/scenegraph/qsgcurveprocessor.cpp +++ b/src/quick/scenegraph/qsgcurveprocessor.cpp @@ -94,7 +94,7 @@ static void fixWinding(TrianglePoints &p) // Return true if the determinant is negative, i.e. if the winding order is opposite of the triangle p1,p2,p3. // This means that p is strictly on the other side of p1-p2 relative to p3 [where p1,p2,p3 is a triangle with // a positive determinant]. -bool checkEdge(QVector2D &p1, QVector2D &p2, QVector2D &p, float epsilon) +bool checkEdge(const QVector2D &p1, const QVector2D &p2, const QVector2D &p, float epsilon) { return determinant(p1, p2, p) <= epsilon; } @@ -163,8 +163,8 @@ bool checkLineTriangleOverlap(TrianglePoints &triangle, LinePoints &line, float { // See if all vertices of the triangle are on the same side of the line bool s1 = determinant(line[0], line[1], triangle[0]) < 0; - auto s2 = determinant(line[0], line[1], triangle[1]) < 0; - auto s3 = determinant(line[0], line[1], triangle[2]) < 0; + bool s2 = determinant(line[0], line[1], triangle[1]) < 0; + bool s3 = determinant(line[0], line[1], triangle[2]) < 0; // If all determinants have the same sign, then there is no overlap if (s1 == s2 && s2 == s3) { return false; -- cgit v1.2.3