From 8198bb580a5640415e09b8fd3533ffaa11317ca6 Mon Sep 17 00:00:00 2001 From: Even Rouault Date: Tue, 18 Dec 2018 22:02:44 +0100 Subject: cpp conversion: fix remaining warnings --- src/pj_ell_set.cpp | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) (limited to 'src/pj_ell_set.cpp') diff --git a/src/pj_ell_set.cpp b/src/pj_ell_set.cpp index 9d7fae0a..486230a5 100644 --- a/src/pj_ell_set.cpp +++ b/src/pj_ell_set.cpp @@ -15,9 +15,9 @@ static int ellps_size (PJ *P); static int ellps_shape (PJ *P); static int ellps_spherification (PJ *P); -static paralist *pj_get_param (paralist *list, char *key); +static paralist *pj_get_param (paralist *list, const char *key); static char *pj_param_value (paralist *list); -static const PJ_ELLPS *pj_find_ellps (char *name); +static const PJ_ELLPS *pj_find_ellps (const char *name); /***************************************************************************************/ @@ -75,7 +75,7 @@ int pj_ellipsoid (PJ *P) { ****************************************************************************************/ int err = proj_errno_reset (P); - char *empty = {""}; + const char *empty = {""}; P->def_size = P->def_shape = P->def_spherification = P->def_ellps = nullptr; @@ -211,7 +211,7 @@ static int ellps_size (PJ *P) { /***************************************************************************************/ static int ellps_shape (PJ *P) { /***************************************************************************************/ - char *keys[] = {"rf", "f", "es", "e", "b"}; + const char *keys[] = {"rf", "f", "es", "e", "b"}; paralist *par = nullptr; char *def = nullptr; size_t i, len; @@ -317,7 +317,7 @@ static const double RV6 = 55/1296.; /***************************************************************************************/ static int ellps_spherification (PJ *P) { /***************************************************************************************/ - char *keys[] = {"R_A", "R_V", "R_a", "R_g", "R_h", "R_lat_a", "R_lat_g"}; + const char *keys[] = {"R_A", "R_V", "R_a", "R_g", "R_h", "R_lat_a", "R_lat_g"}; size_t len, i; paralist *par = nullptr; char *def = nullptr; @@ -400,7 +400,7 @@ static int ellps_spherification (PJ *P) { /* locate parameter in list */ -static paralist *pj_get_param (paralist *list, char *key) { +static paralist *pj_get_param (paralist *list, const char *key) { size_t l = strlen(key); while (list && !(0==strncmp(list->param, key, l) && (0==list->param[l] || list->param[l] == '=') ) ) list = list->next; @@ -421,7 +421,7 @@ static char *pj_param_value (paralist *list) { } -static const PJ_ELLPS *pj_find_ellps (char *name) { +static const PJ_ELLPS *pj_find_ellps (const char *name) { int i; const char *s; const PJ_ELLPS *ellps; -- cgit v1.2.3