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

Andrea Canciani ranma42 at kemper.freedesktop.org
Thu Jun 16 00:49:57 PDT 2011


 src/cairo-path-stroke.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit a06668fabef17daff5f8cea125b8b33ea7568a81
Author: Andrea Canciani <ranma42 at nirvana-fedora.(none)>
Date:   Thu Jun 9 14:16:48 2011 +0200

    path-stroke: Avoid mixing cap and join values
    
    Silence the warning:
    
    cairo-path-stroke.c: In function '_cairo_stroker_add_caps':
    cairo-path-stroke.c:861:29: warning: comparison between
    'cairo_line_cap_t' and 'enum _cairo_line_join' [-Wenum-compare]
    
    CAIRO_LINE_JOIN_ROUND and CAIRO_LINE_CAP_ROUND have the same value,
    hence this defect went unnoticed so far.

diff --git a/src/cairo-path-stroke.c b/src/cairo-path-stroke.c
index d5ced0e..522f1ab 100644
--- a/src/cairo-path-stroke.c
+++ b/src/cairo-path-stroke.c
@@ -858,7 +858,7 @@ _cairo_stroker_add_caps (cairo_stroker_t *stroker)
     if (stroker->has_initial_sub_path
 	&& ! stroker->has_first_face
 	&& ! stroker->has_current_face
-	&& stroker->style.line_cap == CAIRO_LINE_JOIN_ROUND)
+	&& stroker->style.line_cap == CAIRO_LINE_CAP_ROUND)
     {
 	/* pick an arbitrary slope to use */
 	double dx = 1.0, dy = 0.0;


More information about the cairo-commit mailing list