From: Matthew Fernandez Date: Sun, 31 Oct 2021 03:07:47 +0000 (-0700) Subject: addEdgeLabels: remove unused 'g' parameter X-Git-Tag: 2.50.0~52^2~8 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=ac74a3026de20ccb733f3713b9e177469035e2f3;p=graphviz addEdgeLabels: remove unused 'g' parameter --- diff --git a/lib/common/render.h b/lib/common/render.h index 81842ad73..3a94e0c84 100644 --- a/lib/common/render.h +++ b/lib/common/render.h @@ -129,7 +129,7 @@ extern "C" { RENDER_API int place_portlabel(edge_t * e, boolean head_p); RENDER_API void makePortLabels(edge_t * e); RENDER_API pointf edgeMidpoint(graph_t* g, edge_t * e); - RENDER_API void addEdgeLabels(graph_t* g, edge_t * e, pointf rp, pointf rq); + RENDER_API void addEdgeLabels(edge_t * e, pointf rp, pointf rq); RENDER_API void pop_obj_state(GVJ_t *job); RENDER_API obj_state_t* push_obj_state(GVJ_t *job); RENDER_API int rank(graph_t * g, int balance, int maxiter); diff --git a/lib/common/routespl.c b/lib/common/routespl.c index 90f843191..67b107da1 100644 --- a/lib/common/routespl.c +++ b/lib/common/routespl.c @@ -1143,7 +1143,7 @@ makeStraightEdges(graph_t * g, edge_t** edges, int e_cnt, int et, splineInfo* si if (e_cnt == 1 || Concentrate) { if (curved) bend(dumb,get_cycle_centroid(g, edges[0])); clip_and_install(e, aghead(e), dumb, 4, sinfo); - addEdgeLabels(g, e, p, q); + addEdgeLabels(e, p, q); return; } @@ -1199,7 +1199,7 @@ makeStraightEdges(graph_t * g, edge_t** edges, int e_cnt, int et, splineInfo* si else clip_and_install(e0, aghead(e0), dumber, 4, sinfo); - addEdgeLabels(g, e0, p, q); + addEdgeLabels(e0, p, q); dumb[1].x += del.x; dumb[1].y += del.y; dumb[2].x += del.x; diff --git a/lib/common/splines.c b/lib/common/splines.c index 610f794f6..167dde5b5 100644 --- a/lib/common/splines.c +++ b/lib/common/splines.c @@ -1349,7 +1349,7 @@ edgeMidpoint (graph_t* g, edge_t * e) * significantly from rp and rq, but if the spline is degenerate (e.g., * the nodes overlap), we use rp and rq. */ -void addEdgeLabels(graph_t* g, edge_t * e, pointf rp, pointf rq) +void addEdgeLabels(edge_t * e, pointf rp, pointf rq) { makePortLabels(e); } diff --git a/lib/neatogen/multispline.c b/lib/neatogen/multispline.c index 0febdd900..97baa1116 100644 --- a/lib/neatogen/multispline.c +++ b/lib/neatogen/multispline.c @@ -805,7 +805,7 @@ finishEdge (graph_t* g, edge_t* e, Ppoly_t spl, int flip, pointf p, pointf q) clip_and_install(e, aghead(e), spline, spl.pn, &sinfo); free(spline); - addEdgeLabels(g, e, p1, q1); + addEdgeLabels(e, p1, q1); } #define EQPT(p,q) (((p).x==(q).x)&&((p).y==(q).y)) diff --git a/lib/neatogen/neatosplines.c b/lib/neatogen/neatosplines.c index 2966287a2..d46b86671 100644 --- a/lib/neatogen/neatosplines.c +++ b/lib/neatogen/neatosplines.c @@ -484,7 +484,7 @@ makePolyline(graph_t* g, edge_t * e) if (Verbose > 1) fprintf(stderr, "polyline %s %s\n", agnameof(agtail(e)), agnameof(aghead(e))); clip_and_install(e, aghead(e), spl.ps, spl.pn, &sinfo); - addEdgeLabels(g, e, p0, q0); + addEdgeLabels(e, p0, q0); } /* makeSpline: @@ -532,7 +532,7 @@ void makeSpline(graph_t* g, edge_t * e, Ppoly_t ** obs, int npoly, boolean chkPt fprintf(stderr, "spline %s %s\n", agnameof(agtail(e)), agnameof(aghead(e))); clip_and_install(e, aghead(e), spline.ps, spline.pn, &sinfo); free(barriers); - addEdgeLabels(g, e, p, q); + addEdgeLabels(e, p, q); } /* True if either head or tail has a port on its boundary */ @@ -620,7 +620,7 @@ static int _spline_edges(graph_t * g, expand_t* pmargin, int edgetype) /* fprintf (stderr, "%s -- %s %d\n", agnameof(agtail(e)), agnameof(aghead(e)), ED_count(e)); */ node_t *head = aghead(e); if (useEdges && ED_spl(e)) { - addEdgeLabels(g, e, + addEdgeLabels(e, add_pointf(ND_coord(n), ED_tail_port(e).p), add_pointf(ND_coord(head), ED_head_port(e).p)); } diff --git a/lib/ortho/ortho.c b/lib/ortho/ortho.c index d61366d98..d5fefcb3a 100644 --- a/lib/ortho/ortho.c +++ b/lib/ortho/ortho.c @@ -1206,7 +1206,7 @@ attachOrthoEdges (Agraph_t* g, maze* mp, size_t n_edges, route* route_list, spli fprintf(stderr, "ortho %s %s\n", agnameof(agtail(e)),agnameof(aghead(e))); clip_and_install(e, aghead(e), ispline, npts, sinfo); if (doLbls && (lbl = ED_label(e)) && !lbl->set) - addEdgeLabels(g, e, p1, q1); + addEdgeLabels(e, p1, q1); } free(ispline); }