From ecad96cd15ef97ade732a24286f7a383375f28ba Mon Sep 17 00:00:00 2001 From: Matthew Fernandez Date: Mon, 11 Jul 2022 20:45:45 -0700 Subject: [PATCH] circogen getRotation: remove unused 'g' parameter Removing this made a chain of other function parameters unused, so this removes them too. --- lib/circogen/circpos.c | 16 ++++++---------- 1 file changed, 6 insertions(+), 10 deletions(-) diff --git a/lib/circogen/circpos.c b/lib/circogen/circpos.c index ce9f702d0..79d3e02a8 100644 --- a/lib/circogen/circpos.c +++ b/lib/circogen/circpos.c @@ -43,9 +43,7 @@ * Thus, * alpha = theta + M_PI/2 - phi - arcsin((l/R)*(cos phi)) */ -static double -getRotation(block_t * sn, Agraph_t * g, double x, double y, double theta) -{ +static double getRotation(block_t *sn, double x, double y, double theta) { double mindist2; Agraph_t *subg; Agnode_t *n, *closest_node, *neighbor; @@ -235,7 +233,7 @@ setInfo (posinfo_t* p0, posinfo_t* p1, double delta) /* positionChildren: */ static void -positionChildren (Agraph_t* g, posinfo_t* pi, posstate * stp, int length, double min_dist) +positionChildren(posinfo_t *pi, posstate *stp, int length, double min_dist) { block_t *child; double childAngle, childRadius, incidentAngle; @@ -299,7 +297,7 @@ positionChildren (Agraph_t* g, posinfo_t* pi, posstate * stp, int length, double * should return the theta value if there was a rotation else zero */ - rotateAngle = getRotation(child, g, deltaX, deltaY, childAngle); + rotateAngle = getRotation(child, deltaX, deltaY, childAngle); applyDelta(child, deltaX, deltaY, rotateAngle); if (length == 1) { @@ -330,8 +328,7 @@ positionChildren (Agraph_t* g, posinfo_t* pi, posstate * stp, int length, double * Finally, positionChildren is called to do the actual positioning. * If length is 1, keeps track of minimum and maximum child angle. */ -static double -position(Agraph_t * g, int childCount, int length, nodelist_t * path, +static double position(int childCount, int length, nodelist_t *path, block_t * sn, double min_dist) { nodelistitem_t *item; @@ -396,7 +393,7 @@ position(Agraph_t * g, int childCount, int length, nodelist_t * path, } for (i = 0; i < num_parents; i++) { - positionChildren (g, parents + i, &state, length, min_dist); + positionChildren(parents + i, &state, length, min_dist); } free (parents); @@ -442,8 +439,7 @@ static void doBlock(Agraph_t * g, block_t * sn, double min_dist) /* attach children */ if (childCount > 0) - centerAngle = - position(g, childCount, length, longest_path, sn, min_dist); + centerAngle = position(childCount, length, longest_path, sn, min_dist); if ((length == 1) && (BLK_PARENT(sn))) { sn->parent_pos = centerAngle; -- 2.40.0