From: curt Date: Mon, 7 Dec 1998 21:08:01 +0000 (+0000) Subject: Added a const in a couple places to get rid of annoying compiler warnings. X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=f472bc563d42656e4c89444c48116c89122a3e96;p=simgear.git Added a const in a couple places to get rid of annoying compiler warnings. --- diff --git a/Bucket/bucketutils.c b/Bucket/bucketutils.c index 0645fd69..72ab108c 100644 --- a/Bucket/bucketutils.c +++ b/Bucket/bucketutils.c @@ -45,7 +45,7 @@ 3 bits - to represent x (0 to 7) 3 bits - to represent y (0 to 7) */ -long int fgBucketGenIndex(fgBUCKET *p) { +long int fgBucketGenIndex( const fgBUCKET *p) { long index = 0; index = ((p->lon + 180) << 14) + ((p->lat + 90) << 6) + (p->y << 3) + p->x; @@ -73,7 +73,7 @@ void fgBucketParseIndex(long int index, fgBUCKET *p) { /* Build a path name from an tile index */ -void fgBucketGenBasePath(fgBUCKET *p, char *path) { +void fgBucketGenBasePath( const fgBUCKET *p, char *path) { long int index; int top_lon, top_lat, main_lon, main_lat; char hem, pole; @@ -267,9 +267,12 @@ int main() { /* $Log$ -/* Revision 1.3 1998/07/04 00:46:47 curt -/* typedef'd struct fgBUCKET. +/* Revision 1.4 1998/12/07 21:08:01 curt +/* Added a const in a couple places to get rid of annoying compiler warnings. /* + * Revision 1.3 1998/07/04 00:46:47 curt + * typedef'd struct fgBUCKET. + * * Revision 1.2 1998/04/25 22:06:22 curt * Edited cvs log messages in source files ... bad bad bad! * diff --git a/Bucket/bucketutils.h b/Bucket/bucketutils.h index f1925e84..694dc887 100644 --- a/Bucket/bucketutils.h +++ b/Bucket/bucketutils.h @@ -54,7 +54,7 @@ typedef struct { 3 bits - to represent x (0 to 7) 3 bits - to represent y (0 to 7) */ -long int fgBucketGenIndex(fgBUCKET *p); +long int fgBucketGenIndex( const fgBUCKET *p); /* Parse a unique scenery tile index and find the lon, lat, x, and y */ @@ -62,7 +62,7 @@ void fgBucketParseIndex(long int index, fgBUCKET *p); /* Build a path name from an tile index */ -void fgBucketGenBasePath(fgBUCKET *p, char *path); +void fgBucketGenBasePath( const fgBUCKET *p, char *path); /* offset an bucket struct by the specified amounts in the X & Y direction */ @@ -87,9 +87,12 @@ void fgBucketGenIdxArray(fgBUCKET *p1, fgBUCKET *tiles, int width, int height); /* $Log$ -/* Revision 1.2 1998/07/04 00:46:48 curt -/* typedef'd struct fgBUCKET. +/* Revision 1.3 1998/12/07 21:08:03 curt +/* Added a const in a couple places to get rid of annoying compiler warnings. /* + * Revision 1.2 1998/07/04 00:46:48 curt + * typedef'd struct fgBUCKET. + * * Revision 1.1 1998/04/08 23:28:59 curt * Adopted Gnu automake/autoconf system. *