Don't use the deprecated 'register' storage specifier.

It is not only useless with any modern C++ compiler, but also deprecated
in C++11.  Removing it fixes Clang warnings on the subject.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@76580 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Václav Slavík
2014-05-19 17:23:02 +00:00
parent 1b3cba17e8
commit 7a25cf4932
10 changed files with 68 additions and 70 deletions

View File

@@ -308,9 +308,9 @@ prescan_quantize (j_decompress_ptr cinfo, JSAMPARRAY input_buf,
JSAMPARRAY WXUNUSED(output_buf), int num_rows)
{
my_cquantize_ptr cquantize = (my_cquantize_ptr) cinfo->cquantize;
register JSAMPROW ptr;
register histptr histp;
register hist3d histogram = cquantize->histogram;
JSAMPROW ptr;
histptr histp;
hist3d histogram = cquantize->histogram;
int row;
JDIMENSION col;
JDIMENSION width = cinfo->output_width;
@@ -361,9 +361,9 @@ find_biggest_color_pop (boxptr boxlist, int numboxes)
/* Find the splittable box with the largest color population */
/* Returns NULL if no splittable boxes remain */
{
register boxptr boxp;
register int i;
register long maxc = 0;
boxptr boxp;
int i;
long maxc = 0;
boxptr which = NULL;
for (i = 0, boxp = boxlist; i < numboxes; i++, boxp++) {
@@ -381,9 +381,9 @@ find_biggest_volume (boxptr boxlist, int numboxes)
/* Find the splittable box with the largest (scaled) volume */
/* Returns NULL if no splittable boxes remain */
{
register boxptr boxp;
register int i;
register INT32 maxv = 0;
boxptr boxp;
int i;
INT32 maxv = 0;
boxptr which = NULL;
for (i = 0, boxp = boxlist; i < numboxes; i++, boxp++) {
@@ -514,7 +514,7 @@ median_cut (j_decompress_ptr cinfo, boxptr boxlist, int numboxes,
{
int n,lb;
int c0,c1,c2,cmax;
register boxptr b1,b2;
boxptr b1,b2;
while (numboxes < desired_colors) {
/* Select box to split.
@@ -871,12 +871,12 @@ find_best_colors (j_decompress_ptr cinfo, int minc0, int minc1, int minc2,
{
int ic0, ic1, ic2;
int i, icolor;
register INT32 * bptr; /* pointer into bestdist[] array */
INT32 * bptr; /* pointer into bestdist[] array */
JSAMPLE * cptr; /* pointer into bestcolor[] array */
INT32 dist0, dist1; /* initial distance values */
register INT32 dist2; /* current distance in inner loop */
INT32 dist2; /* current distance in inner loop */
INT32 xx0, xx1; /* distance increments */
register INT32 xx2;
INT32 xx2;
INT32 inc0, inc1, inc2; /* initial values for increments */
/* This array holds the distance to the nearest-so-far color for each cell */
INT32 bestdist[BOX_C0_ELEMS * BOX_C1_ELEMS * BOX_C2_ELEMS];
@@ -949,8 +949,8 @@ fill_inverse_cmap (j_decompress_ptr cinfo, int c0, int c1, int c2)
hist3d histogram = cquantize->histogram;
int minc0, minc1, minc2; /* lower left corner of update box */
int ic0, ic1, ic2;
register JSAMPLE * cptr; /* pointer into bestcolor[] array */
register histptr cachep; /* pointer into main cache array */
JSAMPLE * cptr; /* pointer into bestcolor[] array */
histptr cachep; /* pointer into main cache array */
/* This array lists the candidate colormap indexes. */
JSAMPLE colorlist[MAXNUMCOLORS];
int numcolors; /* number of candidate colors */
@@ -1006,9 +1006,9 @@ pass2_no_dither (j_decompress_ptr cinfo,
{
my_cquantize_ptr cquantize = (my_cquantize_ptr) cinfo->cquantize;
hist3d histogram = cquantize->histogram;
register JSAMPROW inptr, outptr;
register histptr cachep;
register int c0, c1, c2;
JSAMPROW inptr, outptr;
histptr cachep;
int c0, c1, c2;
int row;
JDIMENSION col;
JDIMENSION width = cinfo->output_width;
@@ -1040,10 +1040,10 @@ pass2_fs_dither (j_decompress_ptr cinfo,
{
my_cquantize_ptr cquantize = (my_cquantize_ptr) cinfo->cquantize;
hist3d histogram = cquantize->histogram;
register LOCFSERROR cur0, cur1, cur2; /* current error or pixel value */
LOCFSERROR cur0, cur1, cur2; /* current error or pixel value */
LOCFSERROR belowerr0, belowerr1, belowerr2; /* error for pixel below cur */
LOCFSERROR bpreverr0, bpreverr1, bpreverr2; /* error for below/prev col */
register FSERRPTR errorptr; /* => fserrors[] at column before current */
FSERRPTR errorptr; /* => fserrors[] at column before current */
JSAMPROW inptr; /* => current input pixel */
JSAMPROW outptr; /* => current output pixel */
histptr cachep;
@@ -1118,7 +1118,7 @@ pass2_fs_dither (j_decompress_ptr cinfo,
if (*cachep == 0)
fill_inverse_cmap(cinfo, cur0>>C0_SHIFT,cur1>>C1_SHIFT,cur2>>C2_SHIFT);
/* Now emit the colormap index for this cell */
{ register int pixcode = *cachep - 1;
{ int pixcode = *cachep - 1;
*outptr = (JSAMPLE) pixcode;
/* Compute representation error for this pixel */
cur0 -= GETJSAMPLE(colormap0[pixcode]);
@@ -1129,7 +1129,7 @@ pass2_fs_dither (j_decompress_ptr cinfo,
* Add these into the running sums, and simultaneously shift the
* next-line error sums left by 1 column.
*/
{ register LOCFSERROR bnexterr, delta;
{ LOCFSERROR bnexterr, delta;
bnexterr = cur0; /* Process component 0 */
delta = cur0 * 2;