[cairo-commit] cairo/src cairo-hull.c,1.10,1.11

Bertram Felgenhauer commit at pdx.freedesktop.org
Thu Sep 29 20:00:16 PDT 2005


Committed by: inte

Update of /cvs/cairo/cairo/src
In directory gabe:/tmp/cvs-serv32682/src

Modified Files:
	cairo-hull.c 
Log Message:
2005-09-30  Bertram Felgenhauer  <int-e at gmx.de>

	reviewed by: keithp
		
	* src/cairo-hull.c (_cairo_hull_create): simplify id
	initialisation of last patch


Index: cairo-hull.c
===================================================================
RCS file: /cvs/cairo/cairo/src/cairo-hull.c,v
retrieving revision 1.10
retrieving revision 1.11
diff -u -d -r1.10 -r1.11
--- cairo-hull.c	30 Sep 2005 00:26:20 -0000	1.10
+++ cairo-hull.c	30 Sep 2005 03:00:14 -0000	1.11
@@ -70,14 +70,15 @@
 	hull[i].point = vertices[i].point;
 	_cairo_slope_init (&hull[i].slope, &hull[0].point, &hull[i].point);
 
+        /* give each point a unique id for later comparison */
+        hull[i].id = i;
+
+        /* Don't discard by default */
+        hull[i].discard = 0;
+
 	/* Discard all points coincident with the extremal point */
-	if (i != 0 && hull[i].slope.dx == 0 && hull[i].slope.dy == 0) {
+	if (i != 0 && hull[i].slope.dx == 0 && hull[i].slope.dy == 0)
 	    hull[i].discard = 1;
-            hull[i].id = -i;
-        } else {
-	    hull[i].discard = 0;
-            hull[i].id = i;
-        }
     }
 
     return hull;



More information about the cairo-commit mailing list