From a633f78f4cbe59f69bc8bf3d67d594b864372780 Mon Sep 17 00:00:00 2001 From: Matthew Fernandez Date: Sat, 14 Aug 2021 14:19:09 -0700 Subject: [PATCH] plot_dot_map: take a const pointer for a string that is not modified --- cmd/gvmap/make_map.c | 7 +++++-- cmd/gvmap/make_map.h | 6 +++++- 2 files changed, 10 insertions(+), 3 deletions(-) diff --git a/cmd/gvmap/make_map.c b/cmd/gvmap/make_map.c index ac9e891de..05c0e606c 100644 --- a/cmd/gvmap/make_map.c +++ b/cmd/gvmap/make_map.c @@ -314,8 +314,11 @@ static void plot_dot_polygons(agxbuf *sbuff, real line_width, } -void plot_dot_map(Agraph_t* gr, int n, int dim, real *x, SparseMatrix polys, SparseMatrix poly_lines, real line_width, char *line_color, real *x_poly, int *polys_groups, char **labels, - float *fsz, float *r, float *g, float *b, char* opacity, SparseMatrix A, FILE* f){ +void plot_dot_map(Agraph_t* gr, int n, int dim, real *x, SparseMatrix polys, + SparseMatrix poly_lines, real line_width, + const char *line_color, real *x_poly, int *polys_groups, + char **labels, float *fsz, float *r, float *g, float *b, + char* opacity, SparseMatrix A, FILE* f) { /* if graph object exist, we just modify some attributes, otherwise we dump the whole graph */ int plot_polyQ = TRUE; agxbuf sbuff; diff --git a/cmd/gvmap/make_map.h b/cmd/gvmap/make_map.h index ae20a88a0..917d5f868 100644 --- a/cmd/gvmap/make_map.h +++ b/cmd/gvmap/make_map.h @@ -22,7 +22,11 @@ int make_map_from_rectangle_groups(int exclude_random, int include_OK_points, in void improve_contiguity(int n, int dim, int *grouping, SparseMatrix poly_point_map, real *x, SparseMatrix graph); -void plot_dot_map(Agraph_t* gr, int n, int dim, real *x, SparseMatrix polys, SparseMatrix poly_lines, real line_width, char *line_color, real *x_poly, int *polys_groups, char **labels, float *fsz, float *r, float *g, float *b, char* opacity, SparseMatrix A, FILE*); +void plot_dot_map(Agraph_t* gr, int n, int dim, real *x, SparseMatrix polys, + SparseMatrix poly_lines, real line_width, + const char *line_color, real *x_poly, int *polys_groups, + char **labels, float *fsz, float *r, float *g, float *b, + char* opacity, SparseMatrix A, FILE*); void map_optimal_coloring(int seed, SparseMatrix A, float *rgb_r, float *rgb_g, float *rgb_b); void map_palette_optimal_coloring(char *color_scheme, char *lightness, SparseMatrix A, real accuracy, int seed, float **rgb_r, float **rgb_g, float **rgb_b); -- 2.40.0