From: Matthew Fernandez Date: Wed, 14 Sep 2022 01:46:49 +0000 (-0700) Subject: remove unnecessary 'ND_alg' casts X-Git-Tag: 6.0.2~38^2 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=703ba01cfbcd23ab158153a7b7046e1767b378d5;p=graphviz remove unnecessary 'ND_alg' casts --- diff --git a/lib/dotgen/dotsplines.c b/lib/dotgen/dotsplines.c index d15720467..a32ea004f 100644 --- a/lib/dotgen/dotsplines.c +++ b/lib/dotgen/dotsplines.c @@ -290,7 +290,7 @@ setEdgeLabelPos (graph_t * g) for (n = GD_nlist(g); n; n = ND_next(n)) { if (ND_node_type(n) == VIRTUAL) { if (ND_alg(n)) { // label of non-adjacent flat edge - edge_t* fe = (edge_t*)ND_alg(n); + edge_t* fe = ND_alg(n); l = ED_label(fe); assert (l); l->pos = ND_coord(n); @@ -372,7 +372,7 @@ static void _dot_splines(graph_t * g, int normalize) * the label. */ if (ND_alg(n)) { - edge_t* fe = (edge_t*)ND_alg(n); + edge_t* fe = ND_alg(n); assert (ED_label(fe)); ED_label(fe)->pos = ND_coord(n); ED_label(fe)->set = true; diff --git a/lib/dotgen/mincross.c b/lib/dotgen/mincross.c index 85bd4f461..fa91f91ac 100644 --- a/lib/dotgen/mincross.c +++ b/lib/dotgen/mincross.c @@ -303,7 +303,7 @@ checkLabelOrder (graph_t* g) rk = GD_rank(g)+r; for (j = 0; j < rk->n; j++) { u = rk->v[j]; - if ((e = (edge_t*)ND_alg(u))) { + if ((e = ND_alg(u))) { if (!lg) lg = agopen ("lg", Agstrictdirected, 0); snprintf(buf, sizeof(buf), "%d", j); n = agnode(lg, buf, 1); diff --git a/lib/dotgen/position.c b/lib/dotgen/position.c index 1a3578d98..9637ac725 100644 --- a/lib/dotgen/position.c +++ b/lib/dotgen/position.c @@ -260,7 +260,7 @@ make_LR_constraints(graph_t * g) } /* constraints from labels of flat edges on previous rank */ - if ((e = (edge_t*)ND_alg(u))) { + if ((e = ND_alg(u))) { e0 = ND_save_out(u).list[0]; e1 = ND_save_out(u).list[1]; if (ND_order(aghead(e0)) > ND_order(aghead(e1))) { diff --git a/lib/neatogen/constraint.c b/lib/neatogen/constraint.c index ebf8a8f1e..8d143cb09 100644 --- a/lib/neatogen/constraint.c +++ b/lib/neatogen/constraint.c @@ -137,10 +137,10 @@ static void mapGraphs(graph_t * g, graph_t * cg, distfn dist) int delta; for (n = agfstnode(g); n; n = agnxtnode(g, n)) { - tp = (nitem *) ND_alg(n); + tp = ND_alg(n); t = tp->cnode; for (e = agfstout(g, n); e; e = agnxtout(g, e)) { - hp = (nitem *) ND_alg(aghead(e)); + hp = ND_alg(aghead(e)); delta = dist(&tp->bb, &hp->bb); h = hp->cnode; ce = agedge(cg, t, h, NULL, 1);