[cairo-commit] src/cairo-path-stroke-polygon.c src/cairo-path-stroke-tristrip.c

Andrea Canciani ranma42 at kemper.freedesktop.org
Thu Nov 3 01:50:50 PDT 2011


 src/cairo-path-stroke-polygon.c  |    4 ++--
 src/cairo-path-stroke-tristrip.c |    4 ++--
 2 files changed, 4 insertions(+), 4 deletions(-)

New commits:
commit f9aa85f5fe8015204fdab228c6a7b9b0e99b277f
Author: Andrea Canciani <ranma42 at gmail.com>
Date:   Wed Nov 2 13:10:18 2011 +0100

    stroke: Fix typos
    
    The condition was comparing out with itself (always resulting in a
    true result) instead of out and in.
    
    Pointed out by Clang as "idempotent operation".

diff --git a/src/cairo-path-stroke-polygon.c b/src/cairo-path-stroke-polygon.c
index 9128a00..5d121fa 100644
--- a/src/cairo-path-stroke-polygon.c
+++ b/src/cairo-path-stroke-polygon.c
@@ -440,7 +440,7 @@ outer_close (struct stroker *stroker,
     int	clockwise;
 
     if (in->cw.x == out->cw.x && in->cw.y == out->cw.y &&
-	in->ccw.x == out->ccw.x && out->ccw.y == out->ccw.y)
+	in->ccw.x == out->ccw.x && in->ccw.y == out->ccw.y)
     {
 	return;
     }
@@ -635,7 +635,7 @@ outer_join (struct stroker *stroker,
     struct stroke_contour *outer;
 
     if (in->cw.x == out->cw.x && in->cw.y == out->cw.y &&
-	in->ccw.x == out->ccw.x && out->ccw.y == out->ccw.y)
+	in->ccw.x == out->ccw.x && in->ccw.y == out->ccw.y)
     {
 	return;
     }
diff --git a/src/cairo-path-stroke-tristrip.c b/src/cairo-path-stroke-tristrip.c
index 337d814..86f451c 100644
--- a/src/cairo-path-stroke-tristrip.c
+++ b/src/cairo-path-stroke-tristrip.c
@@ -236,7 +236,7 @@ outer_close (struct stroker *stroker,
     int	clockwise;
 
     if (in->cw.x == out->cw.x && in->cw.y == out->cw.y &&
-	in->ccw.x == out->ccw.x && out->ccw.y == out->ccw.y)
+	in->ccw.x == out->ccw.x && in->ccw.y == out->ccw.y)
     {
 	return;
     }
@@ -422,7 +422,7 @@ outer_join (struct stroker *stroker,
     const cairo_point_t	*inpt, *outpt;
 
     if (in->cw.x == out->cw.x && in->cw.y == out->cw.y &&
-	in->ccw.x == out->ccw.x && out->ccw.y == out->ccw.y)
+	in->ccw.x == out->ccw.x && in->ccw.y == out->ccw.y)
     {
 	return;
     }


More information about the cairo-commit mailing list