diff options
| author | Kaj Grönholm <kaj.gronholm@qt.io> | 2024-07-15 08:40:26 +0300 |
|---|---|---|
| committer | Kaj Grönholm <kaj.gronholm@qt.io> | 2024-07-15 13:07:38 +0300 |
| commit | 489f76fe8021d25e540fde532bafbadbc3f6e0bb (patch) | |
| tree | bfd79f38d03622736bc9b8488256ff21f760f499 /src/quick/scenegraph/qsgcurveprocessor.cpp | |
| parent | aed2ddd1d0ced19f3367294d96ad1a55124eaaa7 (diff) | |
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 <eirik.aavitsland@qt.io>
Diffstat (limited to 'src/quick/scenegraph/qsgcurveprocessor.cpp')
| -rw-r--r-- | src/quick/scenegraph/qsgcurveprocessor.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
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; |
