aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKristian Evers <kristianevers@gmail.com>2018-04-23 11:37:10 +0200
committerGitHub <noreply@github.com>2018-04-23 11:37:10 +0200
commite833dbb8d8d5df290bc76bd1d757bf36b62ecf49 (patch)
treeb3ed848f75e7e9a220556985fe5b1abb5619245f
parentd606eeb819628eb300460601e21b3ea988656501 (diff)
parent454c1326e5f1cae87712b011434776375ac84fbb (diff)
downloadPROJ-e833dbb8d8d5df290bc76bd1d757bf36b62ecf49.tar.gz
PROJ-e833dbb8d8d5df290bc76bd1d757bf36b62ecf49.zip
Merge pull request #947 from schwehr/pj_isea_cleanup
PJ_isea.c: change local helper functions to void returns
-rw-r--r--src/PJ_isea.c28
1 files changed, 11 insertions, 17 deletions
diff --git a/src/PJ_isea.c b/src/PJ_isea.c
index 57412a38..3e941c77 100644
--- a/src/PJ_isea.c
+++ b/src/PJ_isea.c
@@ -29,8 +29,8 @@ struct hex {
/* y *must* be positive down as the xy /iso conversion assumes this */
ISEA_STATIC
-int hex_xy(struct hex *h) {
- if (!h->iso) return 1;
+void hex_xy(struct hex *h) {
+ if (!h->iso) return;
if (h->x >= 0) {
h->y = -h->y - (h->x+1)/2;
} else {
@@ -38,13 +38,11 @@ int hex_xy(struct hex *h) {
h->y = -h->y - h->x/2;
}
h->iso = 0;
-
- return 1;
}
ISEA_STATIC
-int hex_iso(struct hex *h) {
- if (h->iso) return 1;
+void hex_iso(struct hex *h) {
+ if (h->iso) return;
if (h->x >= 0) {
h->y = (-h->y - (h->x+1)/2);
@@ -55,12 +53,10 @@ int hex_iso(struct hex *h) {
h->z = -h->x - h->y;
h->iso = 1;
- return 1;
}
ISEA_STATIC
-int hexbin2(double width, double x, double y,
- int *i, int *j) {
+void hexbin2(double width, double x, double y, int *i, int *j) {
double z, rx, ry, rz;
double abs_dx, abs_dy, abs_dz;
int ix, iy, iz, s;
@@ -105,7 +101,6 @@ int hexbin2(double width, double x, double y,
hex_xy(&h);
*i = h.x;
*j = h.y;
- return ix * 100 + iy;
}
#ifndef ISEA_STATIC
#define ISEA_STATIC
@@ -605,27 +600,27 @@ isea_grid_init(struct isea_dgg * g)
}
ISEA_STATIC
-int
+void
isea_orient_isea(struct isea_dgg * g)
{
if (!g)
- return 0;
+ return;
g->o_lat = ISEA_STD_LAT;
g->o_lon = ISEA_STD_LON;
g->o_az = 0.0;
- return 1;
+ return;
}
ISEA_STATIC
-int
+void
isea_orient_pole(struct isea_dgg * g)
{
if (!g)
- return 0;
+ return;
g->o_lat = M_PI / 2.0;
g->o_lon = 0.0;
g->o_az = 0;
- return 1;
+ return;
}
ISEA_STATIC
@@ -1134,4 +1129,3 @@ PJ *PROJECTION(isea) {
return P;
}
-