Skip to content

Commit

Permalink
AGG headers: remove use of deprecated register keyword, that is forbi…
Browse files Browse the repository at this point in the history
…dden in C++17
  • Loading branch information
rouault committed Jan 17, 2020
1 parent c16df18 commit 5158178
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 8 deletions.
2 changes: 1 addition & 1 deletion renderers/agg/include/agg_basics.h
Original file line number Diff line number Diff line change
Expand Up @@ -211,7 +211,7 @@ namespace mapserver
{
AGG_INLINE static unsigned mul(unsigned a, unsigned b)
{
register unsigned q = a * b + (1 << (Shift-1));
const unsigned q = a * b + (1 << (Shift-1));
return (q + (q >> Shift)) >> Shift;
}
};
Expand Down
4 changes: 2 additions & 2 deletions renderers/agg/include/agg_image_accessors.h
Original file line number Diff line number Diff line change
Expand Up @@ -174,8 +174,8 @@ namespace mapserver
private:
AGG_INLINE const int8u* pixel() const
{
register int x = m_x;
register int y = m_y;
int x = m_x;
int y = m_y;
if(x < 0) x = 0;
if(y < 0) y = 0;
if(x >= (int)m_pixf->width()) x = m_pixf->width() - 1;
Expand Down
10 changes: 5 additions & 5 deletions renderers/agg/include/agg_trans_affine.h
Original file line number Diff line number Diff line change
Expand Up @@ -292,25 +292,25 @@ namespace mapserver
//------------------------------------------------------------------------
inline void trans_affine::transform(double* x, double* y) const
{
register double tmp = *x;
const double tmp = *x;
*x = tmp * sx + *y * shx + tx;
*y = tmp * shy + *y * sy + ty;
}

//------------------------------------------------------------------------
inline void trans_affine::transform_2x2(double* x, double* y) const
{
register double tmp = *x;
const double tmp = *x;
*x = tmp * sx + *y * shx;
*y = tmp * shy + *y * sy;
}

//------------------------------------------------------------------------
inline void trans_affine::inverse_transform(double* x, double* y) const
{
register double d = determinant_reciprocal();
register double a = (*x - tx) * d;
register double b = (*y - ty) * d;
const double d = determinant_reciprocal();
const double a = (*x - tx) * d;
const double b = (*y - ty) * d;
*x = a * sy - b * shx;
*y = b * sx - a * shy;
}
Expand Down

0 comments on commit 5158178

Please sign in to comment.