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:
@@ -698,7 +698,7 @@ static wxPointList wx_spline_point_list;
|
||||
void wx_quadratic_spline(double a1, double b1, double a2, double b2, double a3, double b3, double a4,
|
||||
double b4)
|
||||
{
|
||||
register double xmid, ymid;
|
||||
double xmid, ymid;
|
||||
double x1, y1, x2, y2, x3, y3, x4, y4;
|
||||
|
||||
wx_clear_stack();
|
||||
|
@@ -468,7 +468,7 @@ wxChar *wxCopyAbsolutePath(const wxString& filename)
|
||||
template<typename CharType>
|
||||
static CharType *wxDoExpandPath(CharType *buf, const wxString& name)
|
||||
{
|
||||
register CharType *d, *s, *nm;
|
||||
CharType *d, *s, *nm;
|
||||
CharType lnm[_MAXPATHLEN];
|
||||
int q;
|
||||
|
||||
@@ -527,9 +527,9 @@ static CharType *wxDoExpandPath(CharType *buf, const wxString& name)
|
||||
if (*s++ == wxT('$'))
|
||||
#endif
|
||||
{
|
||||
register CharType *start = d;
|
||||
register int braces = (*s == wxT('{') || *s == wxT('('));
|
||||
register CharType *value;
|
||||
CharType *start = d;
|
||||
int braces = (*s == wxT('{') || *s == wxT('('));
|
||||
CharType *value;
|
||||
while ((*d++ = *s) != 0)
|
||||
if (braces ? (*s == wxT('}') || *s == wxT(')')) : !(wxIsalnum(*s) || *s == wxT('_')) )
|
||||
break;
|
||||
@@ -568,7 +568,7 @@ static CharType *wxDoExpandPath(CharType *buf, const wxString& name)
|
||||
}
|
||||
} else
|
||||
{ /* ~user/filename */
|
||||
register CharType *nnm;
|
||||
CharType *nnm;
|
||||
for (s = nm; *s && *s != SEP; s++)
|
||||
{
|
||||
// Empty
|
||||
|
@@ -206,9 +206,9 @@ void wx_jpeg_io_src( j_decompress_ptr cinfo, wxInputStream& infile )
|
||||
|
||||
static inline void wx_cmyk_to_rgb(unsigned char* rgb, const unsigned char* cmyk)
|
||||
{
|
||||
register int k = 255 - cmyk[3];
|
||||
register int k2 = cmyk[3];
|
||||
register int c;
|
||||
int k = 255 - cmyk[3];
|
||||
int k2 = cmyk[3];
|
||||
int c;
|
||||
|
||||
c = k + k2 * (255 - cmyk[0]) / 255;
|
||||
rgb[0] = (unsigned char)((c > 255) ? 0 : (255 - c));
|
||||
|
@@ -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;
|
||||
|
@@ -761,8 +761,8 @@ Thanks,
|
||||
#define SWAP(a, b, size) \
|
||||
do \
|
||||
{ \
|
||||
register size_t __size = (size); \
|
||||
register char *__a = (a), *__b = (b); \
|
||||
size_t __size = (size); \
|
||||
char *__a = (a), *__b = (b); \
|
||||
do \
|
||||
{ \
|
||||
char __tmp = *__a; \
|
||||
@@ -815,7 +815,7 @@ typedef struct
|
||||
void wxQsort(void* pbase, size_t total_elems,
|
||||
size_t size, wxSortCallback cmp, const void* user_data)
|
||||
{
|
||||
register char *base_ptr = (char *) pbase;
|
||||
char *base_ptr = (char *) pbase;
|
||||
const size_t max_thresh = MAX_THRESH * size;
|
||||
|
||||
if (total_elems == 0)
|
||||
@@ -929,7 +929,7 @@ void wxQsort(void* pbase, size_t total_elems,
|
||||
char *thresh = base_ptr + max_thresh;
|
||||
if ( thresh > end_ptr )
|
||||
thresh = end_ptr;
|
||||
register char *run_ptr;
|
||||
char *run_ptr;
|
||||
|
||||
/* Find smallest element in first threshold and place it at the
|
||||
array's beginning. This is the smallest array element,
|
||||
|
@@ -768,7 +768,7 @@ wxChar32* wxStrdup(const wxChar32* s)
|
||||
#ifndef wxCRT_StricmpA
|
||||
WXDLLIMPEXP_BASE int wxCRT_StricmpA(const char *psz1, const char *psz2)
|
||||
{
|
||||
register char c1, c2;
|
||||
char c1, c2;
|
||||
do {
|
||||
c1 = wxTolower(*psz1++);
|
||||
c2 = wxTolower(*psz2++);
|
||||
@@ -780,7 +780,7 @@ WXDLLIMPEXP_BASE int wxCRT_StricmpA(const char *psz1, const char *psz2)
|
||||
#ifndef wxCRT_StricmpW
|
||||
WXDLLIMPEXP_BASE int wxCRT_StricmpW(const wchar_t *psz1, const wchar_t *psz2)
|
||||
{
|
||||
register wchar_t c1, c2;
|
||||
wchar_t c1, c2;
|
||||
do {
|
||||
c1 = wxTolower(*psz1++);
|
||||
c2 = wxTolower(*psz2++);
|
||||
@@ -793,7 +793,7 @@ WXDLLIMPEXP_BASE int wxCRT_StricmpW(const wchar_t *psz1, const wchar_t *psz2)
|
||||
WXDLLIMPEXP_BASE int wxCRT_StrnicmpA(const char *s1, const char *s2, size_t n)
|
||||
{
|
||||
// initialize the variables just to suppress stupid gcc warning
|
||||
register char c1 = 0, c2 = 0;
|
||||
char c1 = 0, c2 = 0;
|
||||
while (n && ((c1 = wxTolower(*s1)) == (c2 = wxTolower(*s2)) ) && c1) n--, s1++, s2++;
|
||||
if (n) {
|
||||
if (c1 < c2) return -1;
|
||||
@@ -807,7 +807,7 @@ WXDLLIMPEXP_BASE int wxCRT_StrnicmpA(const char *s1, const char *s2, size_t n)
|
||||
WXDLLIMPEXP_BASE int wxCRT_StrnicmpW(const wchar_t *s1, const wchar_t *s2, size_t n)
|
||||
{
|
||||
// initialize the variables just to suppress stupid gcc warning
|
||||
register wchar_t c1 = 0, c2 = 0;
|
||||
wchar_t c1 = 0, c2 = 0;
|
||||
while (n && ((c1 = wxTolower(*s1)) == (c2 = wxTolower(*s2)) ) && c1) n--, s1++, s2++;
|
||||
if (n) {
|
||||
if (c1 < c2) return -1;
|
||||
|
@@ -655,9 +655,7 @@ bool REGION::XClipBox(Region r, wxRect *rect)
|
||||
void REGION::
|
||||
miSetExtents (Region pReg)
|
||||
{
|
||||
register BoxPtr pBox,
|
||||
pBoxEnd,
|
||||
pExtents;
|
||||
BoxPtr pBox, pBoxEnd, pExtents;
|
||||
|
||||
if (pReg->numRects == 0)
|
||||
{
|
||||
@@ -720,8 +718,8 @@ XOffsetRegion(
|
||||
register int x,
|
||||
register int y)
|
||||
{
|
||||
register int nbox;
|
||||
register BOX *pbox;
|
||||
int nbox;
|
||||
BOX *pbox;
|
||||
|
||||
pbox = pRegion->rects;
|
||||
nbox = pRegion->numRects;
|
||||
@@ -768,9 +766,9 @@ miIntersectO (
|
||||
wxCoord y1,
|
||||
wxCoord y2)
|
||||
{
|
||||
register wxCoord x1;
|
||||
register wxCoord x2;
|
||||
register BoxPtr pNextRect;
|
||||
wxCoord x1;
|
||||
wxCoord x2;
|
||||
BoxPtr pNextRect;
|
||||
|
||||
pNextRect = &pReg->rects[pReg->numRects];
|
||||
|
||||
@@ -911,9 +909,9 @@ miCoalesce(
|
||||
int prevStart, /* Index of start of previous band */
|
||||
int curStart) /* Index of start of current band */
|
||||
{
|
||||
register BoxPtr pPrevBox; /* Current box in previous band */
|
||||
register BoxPtr pCurBox; /* Current box in current band */
|
||||
register BoxPtr pRegEnd; /* End of region */
|
||||
BoxPtr pPrevBox; /* Current box in previous band */
|
||||
BoxPtr pCurBox; /* Current box in current band */
|
||||
BoxPtr pRegEnd; /* End of region */
|
||||
int curNumRects; /* Number of rectangles in current
|
||||
* band */
|
||||
int prevNumRects; /* Number of rectangles in previous
|
||||
@@ -1088,19 +1086,19 @@ miRegionOp(
|
||||
* overlapping bands in region
|
||||
* 2 */
|
||||
{
|
||||
register BoxPtr r1; /* Pointer into first region */
|
||||
register BoxPtr r2; /* Pointer into 2d region */
|
||||
BoxPtr r1; /* Pointer into first region */
|
||||
BoxPtr r2; /* Pointer into 2d region */
|
||||
BoxPtr r1End; /* End of 1st region */
|
||||
BoxPtr r2End; /* End of 2d region */
|
||||
register wxCoord ybot; /* Bottom of intersection */
|
||||
register wxCoord ytop; /* Top of intersection */
|
||||
wxCoord ybot; /* Bottom of intersection */
|
||||
wxCoord ytop; /* Top of intersection */
|
||||
BoxPtr oldRects; /* Old rects for newReg */
|
||||
int prevBand; /* Index of start of
|
||||
* previous band in newReg */
|
||||
int curBand; /* Index of start of current
|
||||
* band in newReg */
|
||||
register BoxPtr r1BandEnd; /* End of current band in r1 */
|
||||
register BoxPtr r2BandEnd; /* End of current band in r2 */
|
||||
BoxPtr r1BandEnd; /* End of current band in r1 */
|
||||
BoxPtr r2BandEnd; /* End of current band in r2 */
|
||||
wxCoord top; /* Top of non-overlapping
|
||||
* band */
|
||||
wxCoord bot; /* Bottom of non-overlapping
|
||||
@@ -1374,7 +1372,7 @@ miUnionNonO (
|
||||
register wxCoord y1,
|
||||
register wxCoord y2)
|
||||
{
|
||||
register BoxPtr pNextRect;
|
||||
BoxPtr pNextRect;
|
||||
|
||||
pNextRect = &pReg->rects[pReg->numRects];
|
||||
|
||||
@@ -1425,7 +1423,7 @@ miUnionO (
|
||||
register wxCoord y1,
|
||||
register wxCoord y2)
|
||||
{
|
||||
register BoxPtr pNextRect;
|
||||
BoxPtr pNextRect;
|
||||
|
||||
pNextRect = &pReg->rects[pReg->numRects];
|
||||
|
||||
@@ -1575,7 +1573,7 @@ miSubtractNonO1 (
|
||||
register wxCoord y1,
|
||||
register wxCoord y2)
|
||||
{
|
||||
register BoxPtr pNextRect;
|
||||
BoxPtr pNextRect;
|
||||
|
||||
pNextRect = &pReg->rects[pReg->numRects];
|
||||
|
||||
@@ -1624,8 +1622,8 @@ miSubtractO (
|
||||
register wxCoord y1,
|
||||
register wxCoord y2)
|
||||
{
|
||||
register BoxPtr pNextRect;
|
||||
register int x1;
|
||||
BoxPtr pNextRect;
|
||||
int x1;
|
||||
|
||||
x1 = r1->x1;
|
||||
|
||||
@@ -1858,10 +1856,10 @@ wxRegionContain REGION::XRectInRegion(register Region region,
|
||||
unsigned int rwidth,
|
||||
unsigned int rheight)
|
||||
{
|
||||
register BoxPtr pbox;
|
||||
register BoxPtr pboxEnd;
|
||||
BoxPtr pbox;
|
||||
BoxPtr pboxEnd;
|
||||
Box rect;
|
||||
register BoxPtr prect = ▭
|
||||
BoxPtr prect = ▭
|
||||
int partIn, partOut;
|
||||
|
||||
prect->x1 = rx;
|
||||
|
@@ -238,9 +238,9 @@ g_cclosure_user_marshal_VOID__OBJECT_OBJECT (GClosure *closure,
|
||||
gpointer arg_1,
|
||||
gpointer arg_2,
|
||||
gpointer data2);
|
||||
register GMarshalFunc_VOID__OBJECT_OBJECT callback;
|
||||
register GCClosure *cc = (GCClosure*) closure;
|
||||
register gpointer data1, data2;
|
||||
GMarshalFunc_VOID__OBJECT_OBJECT callback;
|
||||
GCClosure *cc = (GCClosure*) closure;
|
||||
gpointer data1, data2;
|
||||
|
||||
g_return_if_fail (n_param_values == 3);
|
||||
|
||||
|
@@ -1321,7 +1321,7 @@ wxBitmap::wxBitmap(const wxImage& image, int depth, double scale)
|
||||
UseAlpha() ;
|
||||
|
||||
unsigned char* destinationstart = (unsigned char*) BeginRawAccess() ;
|
||||
register unsigned char* data = image.GetData();
|
||||
unsigned char* data = image.GetData();
|
||||
if ( destinationstart != NULL && data != NULL )
|
||||
{
|
||||
const unsigned char *alpha = hasAlpha ? image.GetAlpha() : NULL ;
|
||||
|
@@ -634,7 +634,7 @@ wxChar* wxRichTextHTMLHandler::b64enc( unsigned char* input, size_t in_len )
|
||||
|
||||
while( in_len-- > 0 )
|
||||
{
|
||||
register wxChar a, b;
|
||||
wxChar a, b;
|
||||
|
||||
a = *input++;
|
||||
|
||||
|
Reference in New Issue
Block a user