]> git.xonotic.org Git - xonotic/netradiant.git/commitdiff
libs: remove deprecated non-replaced “register“ storage class
authorThomas Debesse <dev@illwieckz.net>
Thu, 11 Mar 2021 05:02:12 +0000 (06:02 +0100)
committerThomas Debesse <dev@illwieckz.net>
Thu, 11 Mar 2021 08:54:19 +0000 (09:54 +0100)
Silent this warning:

- 'register' storage class specifier is deprecated and incompatible with C++17 [-Wdeprecated-register]

This keyword was deprecated in C++11, it is now reserved for future use, and there is no replacement for it.

See also https://stackoverflow.com/a/30809775/9131399

libs/container/hashfunc.h
libs/mathlib/bbox.c
libs/picomodel/lwo/lwio.c

index 95724ea41c6fb3929c2a714ab511f0cbb281c7c7..fa796e5e6efa7ab7ea325d713101ee72c8f07df7 100644 (file)
@@ -182,7 +182,7 @@ inline ub4 hash(
        const UB1Traits& ub1traits,
        const UB4x1Traits& ub4x1traits
        ){
-       register ub4 a,b,c,len;
+       ub4 a,b,c,len;
 
        /* Set up the internal state */
        len = length;
@@ -255,7 +255,7 @@ inline ub4 hash2(
        ub4 initval, /* the previous hash, or an arbitrary value */
        const UB4Traits& ub4traits
        ){
-       register ub4 a,b,c,len;
+       ub4 a,b,c,len;
 
        /* Set up the internal state */
        len = length;
index fe5646d9327e683c2285d0e9f2541a6b436b68dc..8dd639b84b88cec1346979c3f108cd8c12532cbd 100644 (file)
@@ -174,7 +174,7 @@ const int MIDDLE  = 2;
 int aabb_intersect_ray( const aabb_t *aabb, const ray_t *ray, vec3_t intersection ){
        int inside = 1;
        char quadrant[NUMDIM];
-       register int i;
+       int i;
        int whichPlane;
        double maxT[NUMDIM];
        double candidatePlane[NUMDIM];
index e825a3403e97d0b5b6f458cbefed03ae2513eea7..c24ef457b4a86a58c1a604cf5ad3cf5e1b8128ef 100644 (file)
@@ -54,7 +54,7 @@ int get_flen( void ) { return flen; }
    ===================================================================== */
 
 void revbytes( void *bp, int elsize, int elcount ){
-       register unsigned char *p, *q;
+       unsigned char *p, *q;
 
        p = ( unsigned char * ) bp;