+ remove legacy 'register' keyword usage from last century
This commit is contained in:
artemp 2013-10-15 15:22:39 +01:00
parent 9280dd8b45
commit 877128d5ec
3 changed files with 147 additions and 149 deletions

View file

@ -205,7 +205,7 @@ namespace agg
{ {
AGG_INLINE static unsigned mul(unsigned a, unsigned b) AGG_INLINE static unsigned mul(unsigned a, unsigned b)
{ {
register unsigned q = a * b + (1 << (Shift-1)); unsigned q = a * b + (1 << (Shift-1));
return (q + (q >> Shift)) >> Shift; return (q + (q >> Shift)) >> Shift;
} }
}; };
@ -529,4 +529,3 @@ namespace agg
#endif #endif

View file

@ -174,8 +174,8 @@ namespace agg
private: private:
AGG_INLINE const int8u* pixel() const AGG_INLINE const int8u* pixel() const
{ {
register int x = m_x; int x = m_x;
register int y = m_y; int y = m_y;
if(x < 0) x = 0; if(x < 0) x = 0;
if(y < 0) y = 0; if(y < 0) y = 0;
if(x >= (int)m_pixf->width()) x = m_pixf->width() - 1; if(x >= (int)m_pixf->width()) x = m_pixf->width() - 1;

View file

@ -293,7 +293,7 @@ namespace agg
//------------------------------------------------------------------------ //------------------------------------------------------------------------
inline void trans_affine::transform(double* x, double* y) const inline void trans_affine::transform(double* x, double* y) const
{ {
register double tmp = *x; double tmp = *x;
*x = tmp * sx + *y * shx + tx; *x = tmp * sx + *y * shx + tx;
*y = tmp * shy + *y * sy + ty; *y = tmp * shy + *y * sy + ty;
} }
@ -301,7 +301,7 @@ namespace agg
//------------------------------------------------------------------------ //------------------------------------------------------------------------
inline void trans_affine::transform_2x2(double* x, double* y) const inline void trans_affine::transform_2x2(double* x, double* y) const
{ {
register double tmp = *x; double tmp = *x;
*x = tmp * sx + *y * shx; *x = tmp * sx + *y * shx;
*y = tmp * shy + *y * sy; *y = tmp * shy + *y * sy;
} }
@ -309,9 +309,9 @@ namespace agg
//------------------------------------------------------------------------ //------------------------------------------------------------------------
inline void trans_affine::inverse_transform(double* x, double* y) const inline void trans_affine::inverse_transform(double* x, double* y) const
{ {
register double d = determinant_reciprocal(); double d = determinant_reciprocal();
register double a = (*x - tx) * d; double a = (*x - tx) * d;
register double b = (*y - ty) * d; double b = (*y - ty) * d;
*x = a * sy - b * shx; *x = a * sy - b * shx;
*y = b * sx - a * shy; *y = b * sx - a * shy;
} }
@ -516,4 +516,3 @@ namespace agg
#endif #endif