Skip to content
Permalink
Browse files

Remove use of deprecated register keyword

  • Loading branch information
nyalldawson committed Feb 19, 2015
1 parent b45d384 commit 6e4768367f67b547148e48abb069a85cfd16cc21
@@ -331,11 +331,6 @@ ELSEIF ("${CMAKE_CXX_COMPILER_ID}" MATCHES "Clang")
OR (APPLE AND CMAKE_CXX_COMPILER_VERSION VERSION_GREATER "4.1"))
SET(USE_CXX_11 TRUE)
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11 -Wno-error=c++11-narrowing")
#deprecated-register breaks Travis builds
IF ((NOT APPLE AND CMAKE_CXX_COMPILER_VERSION VERSION_GREATER "3.3")
OR (APPLE AND CMAKE_CXX_COMPILER_VERSION VERSION_GREATER "5.0"))
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-deprecated-register")
ENDIF()
ENDIF()
ELSE()
SET(USE_CXX_11 FALSE)
@@ -67,7 +67,7 @@ static inline void generate_numbers()
*/

static const uint32_t MATRIX[2] = {0, 0x9908b0df};
register uint32_t y, i = 0;
uint32_t y, i = 0;

// i = [0 ... 226]
while ( i < ( DIFF - 1 ) )
@@ -145,7 +145,7 @@ extern "C" void seed( uint32_t value )
MT[0] = value;
index = 0;

for ( register unsigned i = 1; i < SIZE; ++i )
for ( unsigned i = 1; i < SIZE; ++i )
MT[i] = 0x6c078965 * ( MT[i-1] ^ MT[i-1] >> 30 ) + i;
}

@@ -154,7 +154,7 @@ extern "C" uint32_t rand_u32()
if ( !index )
generate_numbers();

register uint32_t y = MT[index];
uint32_t y = MT[index];

// Tempering
y ^= y >> 11;
@@ -65,7 +65,7 @@ namespace pal
while ( this->alpha < 0 )
this->alpha += 2 * M_PI;

register double beta = this->alpha + ( M_PI / 2 );
double beta = this->alpha + ( M_PI / 2 );

double dx1, dx2, dy1, dy2;

@@ -682,8 +682,8 @@ namespace pal
int *sub;

int id;
register int featS;
register int p;
int featS;
int p;
int i;

int n = 0;
@@ -1390,7 +1390,7 @@ namespace pal
int subSize = part->subSize;
int *sub = part->sub;
int *sol = part->sol;
register int subseed;
int subseed;

double delta;
double delta_min;
@@ -329,8 +329,8 @@ void Builder::addArc( const DL_ArcData& data )
return;
}

register int i = 0;
register long shpIndex = 0;
int i = 0;
long shpIndex = 0;

// Approximate the arc

@@ -411,7 +411,7 @@ void Builder::addCircle( const DL_CircleData& data )
DL_PointData myPoint;

// Approximate the circle with 360 line segments connecting points along that circle
register long shpIndex = 0;
long shpIndex = 0;
for ( double i = 0.0; i <= 2*M_PI; i += M_PI / 180.0, shpIndex++ )
{
myPoint.x = data.radius * cos( i ) + data.cx + currentBlockX;

0 comments on commit 6e47683

Please sign in to comment.
You can’t perform that action at this time.