From 53e93c2da6be64abf3c343942618384f4b8de7da Mon Sep 17 00:00:00 2001 From: Even Rouault Date: Tue, 26 Feb 2019 21:17:33 +0100 Subject: [PATCH] Fix build issues on Solaris --- src/apps/proj_strtod.cpp | 2 +- src/projections/eqearth.cpp | 2 +- src/projections/igh.cpp | 2 +- src/projections/isea.cpp | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/apps/proj_strtod.cpp b/src/apps/proj_strtod.cpp index b8edc6a32c..d4674705a7 100644 --- a/src/apps/proj_strtod.cpp +++ b/src/apps/proj_strtod.cpp @@ -309,7 +309,7 @@ double proj_strtod(const char *str, char **endptr) { number = exponent < 0? number / ex: number * ex; } else - number *= pow (10, exponent); + number *= pow (10.0, static_cast(exponent)); return number; } diff --git a/src/projections/eqearth.cpp b/src/projections/eqearth.cpp index dc58eed92e..734992627a 100644 --- a/src/projections/eqearth.cpp +++ b/src/projections/eqearth.cpp @@ -26,7 +26,7 @@ PROJ_HEAD(eqearth, "Equal Earth") "\n\tPCyl, Sph&Ell"; #define A2 -0.081106 #define A3 0.000893 #define A4 0.003796 -#define M (sqrt(3) / 2.0) +#define M (sqrt(3.0) / 2.0) #define MAX_Y 1.3173627591574 /* 90° latitude on a sphere with radius 1 */ #define EPS 1e-11 diff --git a/src/projections/igh.cpp b/src/projections/igh.cpp index a8efbb9dd4..d6b2d38d8f 100644 --- a/src/projections/igh.cpp +++ b/src/projections/igh.cpp @@ -77,7 +77,7 @@ static PJ_XY s_forward (PJ_LP lp, PJ *P) { /* Spheroidal, forward */ static PJ_LP s_inverse (PJ_XY xy, PJ *P) { /* Spheroidal, inverse */ PJ_LP lp = {0.0,0.0}; struct pj_opaque *Q = static_cast(P->opaque); - const double y90 = Q->dy0 + sqrt(2); /* lt=90 corresponds to y=y0+sqrt(2) */ + const double y90 = Q->dy0 + sqrt(2.0); /* lt=90 corresponds to y=y0+sqrt(2) */ int z = 0; if (xy.y > y90+EPSLN || xy.y < -y90+EPSLN) /* 0 */ diff --git a/src/projections/isea.cpp b/src/projections/isea.cpp index 3a0a0a484c..d53317c1d9 100644 --- a/src/projections/isea.cpp +++ b/src/projections/isea.cpp @@ -847,7 +847,7 @@ static long isea_disn(struct isea_dgg *g, int quad, struct isea_pt *di) { return g->serial; } /* hexes in a quad */ - hexes = lround(pow(g->aperture, g->resolution)); + hexes = lround(pow(static_cast(g->aperture), static_cast(g->resolution))); if (quad == 11) { g->serial = 1 + 10 * hexes + 1; return g->serial;