diff options
author | Michele Calgaro <michele.calgaro@yahoo.it> | 2020-01-30 20:17:34 +0900 |
---|---|---|
committer | Michele Calgaro <michele.calgaro@yahoo.it> | 2020-01-30 23:14:04 +0900 |
commit | aa98dbfe80580169f3df12489a77e8b904a1d9b9 (patch) | |
tree | 483608a6346be3fa4d8f95d35a05952c81221b91 /tdefx | |
parent | f29aa92d38e9e1f353ed48f7952150437db8c890 (diff) | |
download | tdelibs-aa98dbfe80580169f3df12489a77e8b904a1d9b9.tar.gz tdelibs-aa98dbfe80580169f3df12489a77e8b904a1d9b9.zip |
Removed explicit usage of the 'register' keyword.
Signed-off-by: Michele Calgaro <michele.calgaro@yahoo.it>
Diffstat (limited to 'tdefx')
-rw-r--r-- | tdefx/kimageeffect.cpp | 104 | ||||
-rw-r--r-- | tdefx/kpixmap.cpp | 2 | ||||
-rw-r--r-- | tdefx/kpixmapeffect.cpp | 8 | ||||
-rw-r--r-- | tdefx/tdestyle.cpp | 20 |
4 files changed, 67 insertions, 67 deletions
diff --git a/tdefx/kimageeffect.cpp b/tdefx/kimageeffect.cpp index 41bfd6d7e..277e1cc7f 100644 --- a/tdefx/kimageeffect.cpp +++ b/tdefx/kimageeffect.cpp @@ -136,7 +136,7 @@ TQImage KImageEffect::gradient(const TQSize &size, const TQColor &ca, return image; } - register int x, y; + int x, y; rDiff = (rcb = cb.red()) - (rca = ca.red()); gDiff = (gcb = cb.green()) - (gca = ca.green()); @@ -147,9 +147,9 @@ TQImage KImageEffect::gradient(const TQSize &size, const TQColor &ca, uint *p; uint rgb; - register int rl = rca << 16; - register int gl = gca << 16; - register int bl = bca << 16; + int rl = rca << 16; + int gl = gca << 16; + int bl = bca << 16; if( eff == VerticalGradient ) { @@ -424,7 +424,7 @@ TQImage KImageEffect::unbalancedGradient(const TQSize &size, const TQColor &ca, return image; } - register int x, y; + int x, y; unsigned int *scanline; rDiff = (rcb = cb.red()) - (rca = ca.red()); @@ -949,7 +949,7 @@ TQImage& KImageEffect::modulate(TQImage &image, TQImage &modImage, bool reverse, TQColor clr; int mod=0; unsigned int x1, x2, y1, y2; - register int x, y; + int x, y; // for image, we handle only depth 32 if (image.depth()<32) image = image.convertDepth(32); @@ -1280,12 +1280,12 @@ TQImage& KImageEffect::blend(const TQColor& clr, TQImage& dst, float opacity) clr.rgb(&rcol, &gcol, &bcol); #ifdef WORDS_BIGENDIAN // ARGB (skip alpha) - register unsigned char *data = (unsigned char *)dst.bits() + 1; + unsigned char *data = (unsigned char *)dst.bits() + 1; #else // BGRA - register unsigned char *data = (unsigned char *)dst.bits(); + unsigned char *data = (unsigned char *)dst.bits(); #endif - for (register int i=0; i<pixels; i++) + for (int i=0; i<pixels; i++) { #ifdef WORDS_BIGENDIAN *data += (unsigned char)((rcol - *data) * opacity); @@ -1513,14 +1513,14 @@ TQImage& KImageEffect::blend(TQImage& src, TQImage& dst, float opacity) { #ifdef WORDS_BIGENDIAN // ARGB (skip alpha) - register unsigned char *data1 = (unsigned char *)dst.bits() + 1; - register unsigned char *data2 = (unsigned char *)src.bits() + 1; + unsigned char *data1 = (unsigned char *)dst.bits() + 1; + unsigned char *data2 = (unsigned char *)src.bits() + 1; #else // BGRA - register unsigned char *data1 = (unsigned char *)dst.bits(); - register unsigned char *data2 = (unsigned char *)src.bits(); + unsigned char *data1 = (unsigned char *)dst.bits(); + unsigned char *data2 = (unsigned char *)src.bits(); #endif - for (register int i=0; i<pixels; i++) + for (int i=0; i<pixels; i++) { #ifdef WORDS_BIGENDIAN *data1 += (unsigned char)((*(data2++) - *data1) * opacity); @@ -1582,7 +1582,7 @@ TQImage& KImageEffect::blend(TQImage &image, float initial_intensity, var = -var; } - register int x, y; + int x, y; unsigned int *data = (unsigned int *)image.bits(); @@ -1790,7 +1790,7 @@ TQImage& KImageEffect::blend(TQImage &image1, TQImage &image2, unsigned int x1, x2, x3, y1, y2, y3; unsigned int a; - register int x, y; + int x, y; // for image1 and image2, we only handle depth 32 if (image1.depth()<32) image1 = image1.convertDepth(32); @@ -1884,7 +1884,7 @@ TQImage& KImageEffect::hash(TQImage &image, Lighting lite, unsigned int spacing) return image; } - register int x, y; + int x, y; unsigned int *data = (unsigned int *)image.bits(); unsigned int ind; @@ -2142,9 +2142,9 @@ TQImage& KImageEffect::toGray(TQImage &img, bool fast) if(fast){ if (img.depth() == 32) { - register uchar * r(img.bits()); - register uchar * g(img.bits() + 1); - register uchar * b(img.bits() + 2); + uchar * r(img.bits()); + uchar * g(img.bits() + 1); + uchar * b(img.bits() + 2); uchar * end(img.bits() + img.numBytes()); @@ -2161,11 +2161,11 @@ TQImage& KImageEffect::toGray(TQImage &img, bool fast) { for (int i = 0; i < img.numColors(); i++) { - register uint r = tqRed(img.color(i)); - register uint g = tqGreen(img.color(i)); - register uint b = tqBlue(img.color(i)); + uint r = tqRed(img.color(i)); + uint g = tqGreen(img.color(i)); + uint b = tqBlue(img.color(i)); - register uint gray = (((r + g) >> 1) + b) >> 1; + uint gray = (((r + g) >> 1) + b) >> 1; img.setColor(i, tqRgba(gray, gray, gray, tqAlpha(img.color(i)))); } } @@ -2408,10 +2408,10 @@ bool KImageEffect::blend( output = lower.copy(); - register uchar *i, *o; - register int a; - register int col; - register int w = upper.width(); + uchar *i, *o; + int a; + int col; + int w = upper.width(); int row(upper.height() - 1); do { @@ -2490,10 +2490,10 @@ bool KImageEffect::blend( // output.setAlphaBuffer(true); // I should do some benchmarks to see if // this is worth the effort - register TQRgb *i, *o, *b; + TQRgb *i, *o, *b; - register int a; - register int j,k; + int a; + int j,k; for (j=0; j<ch; j++) { b=reinterpret_cast<TQRgb *>(&const_cast<TQImage&>(lower).scanLine(y+j) [ (x+cw) << 2 ]); @@ -2549,9 +2549,9 @@ bool KImageEffect::blendOnLower( if ( cw <= 0 || ch <= 0 ) return true; } - register uchar *i, *b; - register int a; - register int k; + uchar *i, *b; + int a; + int k; for (int j=0; j<ch; j++) { @@ -3102,7 +3102,7 @@ unsigned int KImageEffect::generateNoise(unsigned int pixel, } case PoissonNoise: { - register int + int i; for (i=0; alpha > exp(-SigmaPoisson*pixel); i++) @@ -3709,7 +3709,7 @@ void KImageEffect::normalize(TQImage &image) TQ_INT64 number_pixels; int x, y; unsigned int *p, *q; - register long i; + long i; unsigned long threshold_intensity; unsigned char r, g, b, a; @@ -4016,7 +4016,7 @@ TQImage KImageEffect::edge(TQImage &image, double radius) { double *kernel; int width; - register long i; + long i; TQImage dest; if(radius == 50.0){ @@ -4054,7 +4054,7 @@ TQImage KImageEffect::emboss(TQImage &image, double radius, double sigma) { double alpha, *kernel; int j, width; - register long i, u, v; + long i, u, v; TQImage dest; if(sigma == 0.0){ @@ -4099,10 +4099,10 @@ void KImageEffect::blurScanLine(double *kernel, int width, unsigned int *src, unsigned int *dest, int columns) { - register double *p; + double *p; unsigned int *q; - register int x; - register long i; + int x; + long i; double red, green, blue, alpha; double scale = 0.0; @@ -4239,7 +4239,7 @@ int KImageEffect::getBlurKernel(int width, double sigma, double **kernel) { #define KernelRank 3 double alpha, normalize; - register long i; + long i; int bias; assert(sigma != 0.0); @@ -4352,8 +4352,8 @@ bool KImageEffect::convolveImage(TQImage *image, TQImage *dest, long width; double red, green, blue, alpha; double normalize, *normal_kernel; - register const double *k; - register unsigned int *q; + const double *k; + unsigned int *q; int x, y, mx, my, sx, sy; long i; int mcx, mcy; @@ -4425,7 +4425,7 @@ int KImageEffect::getOptimalKernelWidth(double radius, double sigma) { double normalize, value; long width; - register long u; + long u; assert(sigma != 0.0); if(radius > 0.0) @@ -4453,7 +4453,7 @@ TQImage KImageEffect::sharpen(TQImage &image, double radius, double sigma) { double alpha, normalize, *kernel; int width; - register long i, u, v; + long i, u, v; TQImage dest; if(sigma == 0.0){ @@ -4957,12 +4957,12 @@ TQImage KImageEffect::convertToPremultipliedAlpha(TQImage input) { int w = alphaImage.width(); int h = alphaImage.height(); - register int r; - register int g; - register int b; - register int a; - register float alpha_adjust; - register TQRgb l; + int r; + int g; + int b; + int a; + float alpha_adjust; + TQRgb l; TQRgb *ls; for (int y = 0; y < h; ++y) { ls = (TQRgb *)alphaImage.scanLine( y ); diff --git a/tdefx/kpixmap.cpp b/tdefx/kpixmap.cpp index 75ae86565..8cc9e384a 100644 --- a/tdefx/kpixmap.cpp +++ b/tdefx/kpixmap.cpp @@ -34,7 +34,7 @@ // Based on Qt's image conversion functions static bool kdither_32_to_8( const TQImage *src, TQImage *dst ) { - // register QRgb *p; + // TQRgb *p; uchar *b; int y; diff --git a/tdefx/kpixmapeffect.cpp b/tdefx/kpixmapeffect.cpp index c4bf04dae..6e09c715f 100644 --- a/tdefx/kpixmapeffect.cpp +++ b/tdefx/kpixmapeffect.cpp @@ -30,15 +30,15 @@ KPixmap& KPixmapEffect::gradient(KPixmap &pixmap, const TQColor &ca, int rDiff, gDiff, bDiff; int rca, gca, bca /*, rcb, gcb, bcb*/; - register int x, y; + int x, y; rDiff = (/*rcb = */ cb.red()) - (rca = ca.red()); gDiff = (/*gcb = */ cb.green()) - (gca = ca.green()); bDiff = (/*bcb = */ cb.blue()) - (bca = ca.blue()); - register int rl = rca << 16; - register int gl = gca << 16; - register int bl = bca << 16; + int rl = rca << 16; + int gl = gca << 16; + int bl = bca << 16; int rcdelta = ((1<<16) / (eff == VerticalGradient ? pixmap.height() : pixmap.width())) * rDiff; int gcdelta = ((1<<16) / (eff == VerticalGradient ? pixmap.height() : pixmap.width())) * gDiff; diff --git a/tdefx/tdestyle.cpp b/tdefx/tdestyle.cpp index 8e9fe40f0..ded6a2372 100644 --- a/tdefx/tdestyle.cpp +++ b/tdefx/tdestyle.cpp @@ -2031,11 +2031,11 @@ void TransparencyHandler::rightShadow(TQImage& dst) // blend top-right corner. int pixels = dst.width() * dst.height(); #ifdef WORDS_BIGENDIAN - register unsigned char* data = dst.bits() + 1; // Skip alpha + unsigned char* data = dst.bits() + 1; // Skip alpha #else - register unsigned char* data = dst.bits(); // Skip alpha + unsigned char* data = dst.bits(); // Skip alpha #endif - for(register int i = 0; i < 16; i++) { + for(int i = 0; i < 16; i++) { if (have_composite) { data++; data++; @@ -2051,8 +2051,8 @@ void TransparencyHandler::rightShadow(TQImage& dst) } pixels -= 32; // tint right strip without rounded edges. - register int c = 0; - for(register int i = 0; i < pixels; i++) { + int c = 0; + for(int i = 0; i < pixels; i++) { if (have_composite) { data++; data++; @@ -2070,7 +2070,7 @@ void TransparencyHandler::rightShadow(TQImage& dst) } // tint bottom edge - for(register int i = 0; i < 16; i++) { + for(int i = 0; i < 16; i++) { if (have_composite) { data++; data++; @@ -2099,15 +2099,15 @@ void TransparencyHandler::bottomShadow(TQImage& dst) double* corner = const_cast<double*>(bottom_left_corner); #ifdef WORDS_BIGENDIAN - register unsigned char* data = dst.bits() + 1; // Skip alpha + unsigned char* data = dst.bits() + 1; // Skip alpha #else - register unsigned char* data = dst.bits(); // Skip alpha + unsigned char* data = dst.bits(); // Skip alpha #endif for(int y = 0; y < 4; y++) { // Bottom-left Corner - for(register int x = 0; x < 4; x++) { + for(int x = 0; x < 4; x++) { if (have_composite) { data++; data++; @@ -2124,7 +2124,7 @@ void TransparencyHandler::bottomShadow(TQImage& dst) } // Scanline - for(register int x = 0; x < width; x++) { + for(int x = 0; x < width; x++) { if (have_composite) { data++; data++; |