From: Thomas Debesse Date: Thu, 11 Mar 2021 05:02:12 +0000 (+0100) Subject: libs: remove deprecated non-replaced “register“ storage class X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=ba634650f9e6f077500822b7f13272f16ec00adf;p=xonotic%2Fnetradiant.git libs: remove deprecated non-replaced “register“ storage class 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 --- diff --git a/libs/container/hashfunc.h b/libs/container/hashfunc.h index 95724ea4..fa796e5e 100644 --- a/libs/container/hashfunc.h +++ b/libs/container/hashfunc.h @@ -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; diff --git a/libs/mathlib/bbox.c b/libs/mathlib/bbox.c index fe5646d9..8dd639b8 100644 --- a/libs/mathlib/bbox.c +++ b/libs/mathlib/bbox.c @@ -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]; diff --git a/libs/picomodel/lwo/lwio.c b/libs/picomodel/lwo/lwio.c index e825a340..c24ef457 100644 --- a/libs/picomodel/lwo/lwio.c +++ b/libs/picomodel/lwo/lwio.c @@ -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;