diff options
author | Michele Calgaro <michele.calgaro@yahoo.it> | 2020-01-30 20:17:32 +0900 |
---|---|---|
committer | Slávek Banko <slavek.banko@axis.cz> | 2021-02-01 23:42:53 +0100 |
commit | 92036ede2d4488a67bfff21821db0507430fcf43 (patch) | |
tree | 3c55f8101dda18e4e0337db8fa4926f6478098b7 /src/kernel/qimage.cpp | |
parent | 0f0b7ff115ae07da28e438ce92022e48c26e9289 (diff) | |
download | qt3-92036ede2d4488a67bfff21821db0507430fcf43.tar.gz qt3-92036ede2d4488a67bfff21821db0507430fcf43.zip |
Removed explicit usage of the 'register' keyword.
Signed-off-by: Michele Calgaro <michele.calgaro@yahoo.it>
(cherry picked from commit 961eb3f6e276b4a3609328a3076ef790026e9c03)
Diffstat (limited to 'src/kernel/qimage.cpp')
-rw-r--r-- | src/kernel/qimage.cpp | 54 |
1 files changed, 27 insertions, 27 deletions
diff --git a/src/kernel/qimage.cpp b/src/kernel/qimage.cpp index f49ae86..10b040b 100644 --- a/src/kernel/qimage.cpp +++ b/src/kernel/qimage.cpp @@ -1392,7 +1392,7 @@ struct QRgbMap { static bool convert_32_to_8( const QImage *src, QImage *dst, int conversion_flags, QRgb* palette=0, int palette_count=0 ) { - register QRgb *p; + QRgb *p; uchar *b; bool do_quant = FALSE; int y, x; @@ -1702,7 +1702,7 @@ static bool convert_8_to_32( const QImage *src, QImage *dst ) return FALSE; // create failed dst->setAlphaBuffer( src->hasAlphaBuffer() ); for ( int y=0; y<dst->height(); y++ ) { // for each scan line... - register uint *p = (uint *)dst->scanLine(y); + uint *p = (uint *)dst->scanLine(y); uchar *b = src->scanLine(y); uint *end = p + dst->width(); while ( p < end ) @@ -1718,7 +1718,7 @@ static bool convert_1_to_32( const QImage *src, QImage *dst ) return FALSE; // could not create dst->setAlphaBuffer( src->hasAlphaBuffer() ); for ( int y=0; y<dst->height(); y++ ) { // for each scan line... - register uint *p = (uint *)dst->scanLine(y); + uint *p = (uint *)dst->scanLine(y); uchar *b = src->scanLine(y); int x; if ( src->bitOrder() == QImage::BigEndian ) { @@ -1756,7 +1756,7 @@ static bool convert_1_to_8( const QImage *src, QImage *dst ) dst->setColor( 1, 0xff000000 ); } for ( int y=0; y<dst->height(); y++ ) { // for each scan line... - register uchar *p = dst->scanLine(y); + uchar *p = dst->scanLine(y); uchar *b = src->scanLine(y); int x; if ( src->bitOrder() == QImage::BigEndian ) { @@ -1833,7 +1833,7 @@ static bool dither_to_1( const QImage *src, QImage *dst, int bmwidth = (w+7)/8; if ( !(line1 && line2) ) return FALSE; - register uchar *p; + uchar *p; uchar *end; int *b1, *b2; int wbytes = w * (d/8); @@ -2083,7 +2083,7 @@ static bool convert_16_to_32( const QImage *src, QImage *dst ) return FALSE; // create failed dst->setAlphaBuffer( src->hasAlphaBuffer() ); for ( int y=0; y<dst->height(); y++ ) { // for each scan line... - register uint *p = (uint *)dst->scanLine(y); + uint *p = (uint *)dst->scanLine(y); ushort *s = (ushort*)src->scanLine(y); uint *end = p + dst->width(); while ( p < end ) @@ -2099,7 +2099,7 @@ static bool convert_32_to_16( const QImage *src, QImage *dst ) return FALSE; // create failed dst->setAlphaBuffer( src->hasAlphaBuffer() ); for ( int y=0; y<dst->height(); y++ ) { // for each scan line... - register ushort *p = (ushort *)dst->scanLine(y); + ushort *p = (ushort *)dst->scanLine(y); uint *s = (uint*)src->scanLine(y); ushort *end = p + dst->width(); while ( p < end ) @@ -2363,7 +2363,7 @@ QImage QImage::convertBitOrder( Endian bitOrder ) const int bpl = (width() + 7) / 8; for ( int y = 0; y < data->h; y++ ) { - register uchar *p = jumpTable()[y]; + uchar *p = jumpTable()[y]; uchar *end = p + bpl; uchar *b = image.jumpTable()[y]; while ( p < end ) @@ -2454,14 +2454,14 @@ void pnmscale(const QImage& src, QImage& dst) { QRgb* xelrow = 0; QRgb* tempxelrow = 0; - register QRgb* xP; - register QRgb* nxP; + QRgb* xP; + QRgb* nxP; int rows, cols, rowsread, newrows, newcols; - register int row, col, needtoreadrow; + int row, col, needtoreadrow; const uchar maxval = 255; double xscale, yscale; long sxscale, syscale; - register long fracrowtofill, fracrowleft; + long fracrowtofill, fracrowleft; long* as; long* rs; long* gs; @@ -2551,11 +2551,11 @@ void pnmscale(const QImage& src, QImage& dst) xelrow = (QRgb*)src.scanLine(rowsread++); needtoreadrow = 0; } - register long a=0; + long a=0; for ( col = 0, xP = xelrow, nxP = tempxelrow; col < cols; ++col, ++xP, ++nxP ) { - register long r, g, b; + long r, g, b; if ( as ) { r = rs[col] + fracrowtofill * qRed( *xP ) * qAlpha( *xP ) / 255; @@ -2601,9 +2601,9 @@ void pnmscale(const QImage& src, QImage& dst) /* shortcut X scaling if possible */ memcpy(dst.scanLine(rowswritten++), tempxelrow, newcols*4); } else { - register long a, r, g, b; - register long fraccoltofill, fraccolleft = 0; - register int needcol; + long a, r, g, b; + long fraccoltofill, fraccolleft = 0; + int needcol; nxP = (QRgb*)dst.scanLine(rowswritten++); fraccoltofill = SCALE; @@ -3692,7 +3692,7 @@ static void swapPixel01( QImage *image ) // 1-bpp: swap 0 and 1 pixels { int i; if ( image->depth() == 1 && image->numColors() == 2 ) { - register uint *p = (uint *)image->bits(); + uint *p = (uint *)image->bits(); int nbytes = image->numBytes(); for ( i=0; i<nbytes/4; i++ ) { *p = ~*p; @@ -3942,7 +3942,7 @@ static QImageHandler *get_image_handler( const char *format ) { // get pointer to handler qt_init_image_handlers(); qt_init_image_plugins(); - register QImageHandler *p = imageHandlers->first(); + QImageHandler *p = imageHandlers->first(); while ( p ) { // traverse list if ( p->format == format ) return p; @@ -4776,7 +4776,7 @@ bool read_dib( QDataStream& s, int offset, int startpos, QImage& image ) Q_CHECK_PTR( buf ); if ( comp == BMP_RLE4 ) { // run length compression int x=0, y=0, b, c, i; - register uchar *p = line[h-1]; + uchar *p = line[h-1]; uchar *endp = line[h-1]+w; while ( y < h ) { if ( (b=d->getch()) == EOF ) @@ -4841,7 +4841,7 @@ bool read_dib( QDataStream& s, int offset, int startpos, QImage& image ) while ( --h >= 0 ) { if ( d->readBlock((char*)buf,buflen) != buflen ) break; - register uchar *p = line[h]; + uchar *p = line[h]; uchar *b = buf; for ( int i=0; i<w/2; i++ ) { // convert nibbles to bytes *p++ = *b >> 4; @@ -4857,7 +4857,7 @@ bool read_dib( QDataStream& s, int offset, int startpos, QImage& image ) else if ( nbits == 8 ) { // 8 bit BMP image if ( comp == BMP_RLE8 ) { // run length compression int x=0, y=0, b; - register uchar *p = line[h-1]; + uchar *p = line[h-1]; const uchar *endp = line[h-1]+w; while ( y < h ) { if ( (b=d->getch()) == EOF ) @@ -4920,7 +4920,7 @@ bool read_dib( QDataStream& s, int offset, int startpos, QImage& image ) } else if ( nbits == 16 || nbits == 24 || nbits == 32 ) { // 16,24,32 bit BMP image - register QRgb *p; + QRgb *p; QRgb *end; uchar *buf24 = new uchar[bpl]; int bpl24 = ((w*nbits+31)/32)*4; @@ -5051,7 +5051,7 @@ bool qt_write_dib( QDataStream& s, QImage image ) uchar *buf = new uchar[bpl_bmp]; uchar *b, *end; - register uchar *p; + uchar *p; memset( buf, 0, bpl_bmp ); for ( y=image.height()-1; y>=0; y-- ) { // write the image bits @@ -5237,7 +5237,7 @@ static void read_pbm_image( QImageIO *iio ) // read PBM image data } } } else { // read ascii data - register uchar *p; + uchar *p; int n; for ( y=0; y<h; y++ ) { p = image.scanLine( y ); @@ -5502,7 +5502,7 @@ static void read_async_image( QImageIO *iio ) X bitmap image read/write functions *****************************************************************************/ -static inline int hex2byte( register char *p ) +static inline int hex2byte( char *p ) { return ( (isdigit((uchar) *p) ? *p - '0' : toupper((uchar) *p) - 'A' + 10) << 4 ) | ( isdigit((uchar) *(p+1)) ? *(p+1) - '0' : toupper((uchar) *(p+1)) - 'A' + 10 ); @@ -5620,7 +5620,7 @@ static void write_xbm_image( QImageIO *iio ) } } int bcnt = 0; - register char *p = buf; + char *p = buf; int bpl = (w+7)/8; for (int y = 0; y < h; ++y) { uchar *b = image.scanLine(y); |