]> granicus.if.org Git - graphviz/commitdiff
sparse get_or_assign_node_force: remove unnecessary casts
authorMatthew Fernandez <matthew.fernandez@gmail.com>
Thu, 29 Dec 2022 21:46:37 +0000 (13:46 -0800)
committerMatthew Fernandez <matthew.fernandez@gmail.com>
Sat, 31 Dec 2022 16:33:58 +0000 (08:33 -0800)
lib/sparse/QuadTree.c

index 67b3cf7dd86fbea0c9e373c34253ad99aa225aa4..bf3fed0fd11c617efbb6e67f1688a1dd07e8b4ba 100644 (file)
@@ -139,11 +139,11 @@ void QuadTree_get_supernodes(QuadTree qt, double bh, double *point, int nodeid,
 
 static double *get_or_assign_node_force(double *force, int i, SingleLinkedList l, int dim){
 
-  double *f = (double*) node_data_get_data(SingleLinkedList_get_data(l));
+  double *f = node_data_get_data(SingleLinkedList_get_data(l));
 
   if (!f){
     node_data_get_data(SingleLinkedList_get_data(l)) = &(force[i*dim]);
-    f = (double*) node_data_get_data(SingleLinkedList_get_data(l));
+    f = node_data_get_data(SingleLinkedList_get_data(l));
   }
   return f;
 }