Skip to content

Commit

Permalink
Clean up some compiler warnings in AGG (celiagg#99)
Browse files Browse the repository at this point in the history
* Remove register storage class specifiers
* Reorder the initializer list of agg::trans_double_path
* Silence some compiler warnings
  • Loading branch information
jwiggins authored Mar 24, 2021
1 parent 46d7711 commit 85a4785
Show file tree
Hide file tree
Showing 5 changed files with 14 additions and 14 deletions.
8 changes: 4 additions & 4 deletions agg-svn/agg-2.4/font_freetype/agg_font_freetype.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -422,12 +422,12 @@ namespace agg
y += bitmap.rows;
pitch = -pitch;
}
for(i = 0; i < bitmap.rows; i++)
for(i = 0; i < (int)bitmap.rows; i++)
{
sl.reset_spans();
bitset_iterator bits(buf, 0);
int j;
for(j = 0; j < bitmap.width; j++)
for(j = 0; j < (int)bitmap.width; j++)
{
if(bits.bit()) sl.add_cell(x + j, cover_full);
++bits;
Expand Down Expand Up @@ -463,11 +463,11 @@ namespace agg
y += bitmap.rows;
pitch = -pitch;
}
for(i = 0; i < bitmap.rows; i++)
for(i = 0; i < (int)bitmap.rows; i++)
{
sl.reset_spans();
const int8u* p = buf;
for(j = 0; j < bitmap.width; j++)
for(j = 0; j < (int)bitmap.width; j++)
{
if(*p) sl.add_cell(x + j, ras.apply_gamma(*p));
++p;
Expand Down
2 changes: 1 addition & 1 deletion agg-svn/agg-2.4/include/agg_basics.h
Original file line number Diff line number Diff line change
Expand Up @@ -228,7 +228,7 @@ namespace agg
{
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;
}
};
Expand Down
4 changes: 2 additions & 2 deletions agg-svn/agg-2.4/include/agg_image_accessors.h
Original file line number Diff line number Diff line change
Expand Up @@ -174,8 +174,8 @@ namespace agg
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 agg-svn/agg-2.4/include/agg_trans_affine.h
Original file line number Diff line number Diff line change
Expand Up @@ -292,25 +292,25 @@ namespace agg
//------------------------------------------------------------------------
inline void trans_affine::transform(double* x, double* y) const
{
register double tmp = *x;
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;
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;
double d = determinant_reciprocal();
double a = (*x - tx) * d;
double b = (*y - ty) * d;
*x = a * sy - b * shx;
*y = b * sx - a * shy;
}
Expand Down
4 changes: 2 additions & 2 deletions agg-svn/agg-2.4/src/agg_trans_double_path.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -21,10 +21,10 @@ namespace agg

//------------------------------------------------------------------------
trans_double_path::trans_double_path() :
m_kindex1(0.0),
m_kindex2(0.0),
m_base_length(0.0),
m_base_height(1.0),
m_kindex1(0.0),
m_kindex2(0.0),
m_status1(initial),
m_status2(initial),
m_preserve_x_scale(true)
Expand Down

0 comments on commit 85a4785

Please sign in to comment.