From: Matthew Fernandez Date: Thu, 13 Jan 2022 04:22:11 +0000 (-0800) Subject: remove unused 'pedge_flip' X-Git-Tag: 3.0.0~69^2~7 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=72b01567b685e82bee676708d0326b68e1200028;p=graphviz remove unused 'pedge_flip' --- diff --git a/lib/mingle/edge_bundling.cpp b/lib/mingle/edge_bundling.cpp index 2f4b8d027..e349692b5 100644 --- a/lib/mingle/edge_bundling.cpp +++ b/lib/mingle/edge_bundling.cpp @@ -86,23 +86,6 @@ void pedge_delete(pedge e){ free(e); } -pedge pedge_flip(pedge e){ - /* flip the polyline so that last point becomes the first, second last the second, etc*/ - double *y; - double *x = e->x; - int i, dim = e->dim; - int n = e->npoints; - - y = (double*)MALLOC(sizeof(double)*e->dim); - for (i = 0; i < e->npoints/2; i++){ - memcpy(y, &x[i*dim], sizeof(double)*dim); - memcpy(&x[(n-1-i)*dim], &x[i*dim], sizeof(double)*dim); - memcpy(&x[i*dim], y, sizeof(double)*dim); - } - free(y); - return e; -} - static double edge_compatibility(pedge e1, pedge e2){ /* two edges are u1->v1, u2->v2. return 1 if two edges are exactly the same, 0 if they are very different. diff --git a/lib/mingle/edge_bundling.h b/lib/mingle/edge_bundling.h index 013a034dd..19567b9d1 100644 --- a/lib/mingle/edge_bundling.h +++ b/lib/mingle/edge_bundling.h @@ -40,9 +40,6 @@ pedge pedge_new(int np, int dim, double *x); pedge pedge_wgt_new(int np, int dim, double *x, double wgt); pedge pedge_double(pedge e); -/* flip the polyline so that last point becomes the first, second last the second, etc*/ -pedge pedge_flip(pedge e); - #ifdef __cplusplus } #endif