diff options
| author | Kristian Evers <kristianevers@gmail.com> | 2020-11-20 16:37:12 +0100 |
|---|---|---|
| committer | Kristian Evers <kristianevers@gmail.com> | 2020-11-20 16:40:40 +0100 |
| commit | 046270a85faf20f38d01e02942d197db74bb8542 (patch) | |
| tree | f95cc5511d3de0d76070553c3a0b04d71f545c0e /src/transformations/horner.cpp | |
| parent | 56f0ad70054eea15e9671cd67aafd14bf7c11c74 (diff) | |
| download | PROJ-046270a85faf20f38d01e02942d197db74bb8542.tar.gz PROJ-046270a85faf20f38d01e02942d197db74bb8542.zip | |
Remove old pj_ memory (de)allocation functions
Gone are pj_malloc, pj_calloc, pj_dalloc and pj_dealloc. Their primary
function as API memory functions in proj_api.h is no longer there and
the other use as a workaround for old errno problems is no longer valid
either.
Replaced with malloc and free across the codebase.
Diffstat (limited to 'src/transformations/horner.cpp')
| -rw-r--r-- | src/transformations/horner.cpp | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/transformations/horner.cpp b/src/transformations/horner.cpp index a6638773..2c049186 100644 --- a/src/transformations/horner.cpp +++ b/src/transformations/horner.cpp @@ -89,8 +89,8 @@ PROJ_HEAD(horner, "Horner polynomial evaluation"); /* make horner.h interface with proj's memory management */ -#define horner_dealloc(x) pj_dealloc(x) -#define horner_calloc(n,x) pj_calloc(n,x) +#define horner_dealloc(x) free(x) +#define horner_calloc(n,x) calloc(n,x) namespace { // anonymous namespace struct horner { @@ -412,7 +412,7 @@ static int parse_coefs (PJ *P, double *coefs, const char *param, int ncoefs) { char *buf, *init, *next = nullptr; int i; - buf = static_cast<char*>(pj_calloc (strlen (param) + 2, sizeof(char))); + buf = static_cast<char*>(calloc (strlen (param) + 2, sizeof(char))); if (nullptr==buf) { proj_log_error (P, "Horner: No memory left"); return 0; @@ -420,12 +420,12 @@ static int parse_coefs (PJ *P, double *coefs, const char *param, int ncoefs) { sprintf (buf, "t%s", param); if (0==pj_param (P->ctx, P->params, buf).i) { - pj_dealloc (buf); + free (buf); return 0; } sprintf (buf, "s%s", param); init = pj_param(P->ctx, P->params, buf).s; - pj_dealloc (buf); + free (buf); for (i = 0; i < ncoefs; i++) { if (i > 0) { |
