]> granicus.if.org Git - graphviz/commitdiff
remove redundant swidth computation
authorMatthew Fernandez <matthew.fernandez@gmail.com>
Sat, 6 Mar 2021 01:59:23 +0000 (17:59 -0800)
committerMatthew Fernandez <matthew.fernandez@gmail.com>
Tue, 16 Mar 2021 02:25:47 +0000 (19:25 -0700)
The values being computed here were already computed in a previous block and
have not changed since. There was clearly copy-pasted wholesale from the code
above it.

cmd/gvmap/make_map.c

index ad7ad2c194d60cc5a7f3ca773c6ac417df5ecafe..dac318208a4cfe0cdd7c53000286cba19d9e67eb 100644 (file)
@@ -346,9 +346,6 @@ static void dot_polygon(char **sbuff, int *len, int *len_max, int np, float *xp,
       ret = sprintf(&((*sbuff)[*len]), " c %zu -%s C %zu -%s P %d ", strlen(cstring), cstring, strlen(cstring), cstring, np);
     } else {
       if (line_width > 0){
-        sprintf(swidth,"%f",line_width);
-        len_swidth = strlen(swidth);
-        sprintf(swidth,"S %zu -setlinewidth(%f)",len_swidth+14, line_width);
        ret = sprintf(&((*sbuff)[*len]), " c %zu -%s %s L %d ", strlen(cstring), cstring, swidth, np);
       } else {
        ret = sprintf(&((*sbuff)[*len]), " c %zu -%s L %d ", strlen(cstring), cstring, np);