]> granicus.if.org Git - graphviz/commitdiff
remove __CYCLE_CENTROID and conditional code for when it is undefined
authorMatthew Fernandez <matthew.fernandez@gmail.com>
Sat, 26 Jun 2021 02:51:00 +0000 (19:51 -0700)
committerMatthew Fernandez <matthew.fernandez@gmail.com>
Wed, 30 Jun 2021 02:32:59 +0000 (19:32 -0700)
This was unconditionally defined, so remove the alternative that is always
disabled.

lib/common/routespl.c

index becd347ab9704a2c09f7daca1b297769b53e110b..7346af66507f53ebbcfd7a779d984ed9565fca8b 100644 (file)
@@ -842,8 +842,6 @@ static pointf get_centroid(Agraph_t *g)
     return sum;
 }
 
-#define __CYCLE_CENTROID 
-#ifdef __CYCLE_CENTROID
 //generic vector structure
 typedef struct _tag_vec
 {
@@ -1086,7 +1084,6 @@ static pointf get_cycle_centroid(graph_t *g, edge_t* edge)
     sum.y = sum.y / cnt;
     return sum;
 }
-#endif
 
 static void bend(pointf spl[4], pointf centroid)
 {
@@ -1166,11 +1163,7 @@ makeStraightEdges(graph_t * g, edge_t** edges, int e_cnt, int et, splineInfo* si
     p = dumb[1] = dumb[0] = add_pointf(ND_coord(n), ED_tail_port(e).p);
     q = dumb[2] = dumb[3] = add_pointf(ND_coord(head), ED_head_port(e).p);
     if ((e_cnt == 1) || Concentrate) {
-#ifndef __CYCLE_CENTROID
-    if (curved) bend(dumb,get_centroid(g));
-#else
        if (curved) bend(dumb,get_cycle_centroid(g, edges[0]));
-#endif
        clip_and_install(e, aghead(e), dumb, 4, sinfo);
        addEdgeLabels(g, e, p, q);
        return;