]> granicus.if.org Git - graphviz/commitdiff
delaunay.c: remove some unnecessary casts
authorMatthew Fernandez <matthew.fernandez@gmail.com>
Fri, 15 Oct 2021 15:05:26 +0000 (08:05 -0700)
committerMatthew Fernandez <matthew.fernandez@gmail.com>
Sat, 16 Oct 2021 18:18:41 +0000 (11:18 -0700)
lib/neatogen/delaunay.c

index 6f13c6b33c631ff8aa9dc4e2aa8b445bd9610b17..55237175904722b976a39dd2151f1bc7db5e802e 100644 (file)
@@ -544,7 +544,7 @@ get_triangles (double *x, int n, int* tris)
 
     in.numberofpoints = n;
     in.numberofpointattributes = 0;
-    in.pointlist = (REAL *) N_GNEW(in.numberofpoints * 2, REAL);
+    in.pointlist = N_GNEW(in.numberofpoints * 2, REAL);
 
     for (i = 0; i < n; i++){
        in.pointlist[i*2] = x[i*2];
@@ -556,20 +556,20 @@ get_triangles (double *x, int n, int* tris)
     in.numberofholes = 0;
     in.numberofregions = 0;
     in.regionlist = NULL;
-    mid.pointlist = (REAL *) NULL;            /* Not needed if -N switch used. */
-    mid.pointattributelist = (REAL *) NULL;
-    mid.pointmarkerlist = (int *) NULL; /* Not needed if -N or -B switch used. */
-    mid.trianglelist = (int *) NULL;          /* Not needed if -E switch used. */
-    mid.triangleattributelist = (REAL *) NULL;
-    mid.neighborlist = (int *) NULL;         /* Needed only if -n switch used. */
-    mid.segmentlist = (int *) NULL;
-    mid.segmentmarkerlist = (int *) NULL;
-    mid.edgelist = (int *) NULL;             /* Needed only if -e switch used. */
-    mid.edgemarkerlist = (int *) NULL;   /* Needed if -e used and -B not used. */
-    vorout.pointlist = (REAL *) NULL;        /* Needed only if -v switch used. */
-    vorout.pointattributelist = (REAL *) NULL;
-    vorout.edgelist = (int *) NULL;          /* Needed only if -v switch used. */
-    vorout.normlist = (REAL *) NULL;         /* Needed only if -v switch used. */
+    mid.pointlist = NULL; // Not needed if -N switch used.
+    mid.pointattributelist = NULL;
+    mid.pointmarkerlist = NULL; /* Not needed if -N or -B switch used. */
+    mid.trianglelist = NULL; // Not needed if -E switch used.
+    mid.triangleattributelist = NULL;
+    mid.neighborlist = NULL; // Needed only if -n switch used.
+    mid.segmentlist = NULL;
+    mid.segmentmarkerlist = NULL;
+    mid.edgelist = NULL; // Needed only if -e switch used.
+    mid.edgemarkerlist = NULL; // Needed if -e used and -B not used.
+    vorout.pointlist = NULL; // Needed only if -v switch used.
+    vorout.pointattributelist = NULL;
+    vorout.edgelist = NULL; // Needed only if -v switch used.
+    vorout.normlist = NULL; // Needed only if -v switch used.
 
     /* Triangulate the points.  Switches are chosen to read and write a  */
     /*   PSLG (p), preserve the convex hull (c), number everything from  */