]> granicus.if.org Git - graphviz/commitdiff
sparse: use an 'int' for 'id' field in node data
authorMatthew Fernandez <matthew.fernandez@gmail.com>
Sun, 1 Jan 2023 22:10:31 +0000 (14:10 -0800)
committerMatthew Fernandez <matthew.fernandez@gmail.com>
Tue, 3 Jan 2023 02:01:20 +0000 (18:01 -0800)
Making this a `double` seems to have been a mistake. Only `int` values are ever
stored into this field and it is only ever compared against `int` values.

lib/sparse/QuadTree.c

index bb3ea880746efe20f8f37543f88feb101d7b1c66..e8944aacec5aaf900cf5d4fb1b343dfd1b02498f 100644 (file)
@@ -21,7 +21,7 @@ extern double distance_cropped(double *x, int dim, int i, int j);
 struct node_data_struct {
   double node_weight;
   double *coord;
-  double id;
+  int id;
   void *data;
 };