Removed explicit usage of the 'register' keyword.

Signed-off-by: Michele Calgaro <michele.calgaro@yahoo.it>
pull/1/head
Michele Calgaro 5 years ago
parent 1250a835cc
commit 15e8bb327c
Signed by: MicheleC
GPG Key ID: 2A75B7CA8ADED5CF

@ -1119,15 +1119,15 @@ void renderGradient(TQPainter *painter, TQRect &rect,
int rDiff, gDiff, bDiff;
int rc, gc, bc;
register int y;
int y;
rDiff = ( c2.red()) - (rc = c1.red());
gDiff = ( c2.green()) - (gc = c1.green());
bDiff = ( c2.blue()) - (bc = c1.blue());
register int rl = rc << 16;
register int gl = gc << 16;
register int bl = bc << 16;
int rl = rc << 16;
int gl = gc << 16;
int bl = bc << 16;
int rdelta = ((1<<16) / r_h) * rDiff;
int gdelta = ((1<<16) / r_h ) * gDiff;

@ -16,7 +16,7 @@
(c) 2002,2003 Maksim Orlovich <mo002j@mail.rochester.edu>
based on the KDE3 HighColor Style
Copyright (C) 2001-2002 Karol Szwed <gallium@kde.org>
(C) 2001-2002 Fredrik Höglund <fredrik@kde.org>
(C) 2001-2002 Fredrik H<EFBFBD>glund <fredrik@kde.org>
Drawing routines adapted from the KDE2 HCStyle,
Copyright (C) 2000 Daniel M. Duley <mosfet@kde.org>
(C) 2000 Dirk Mueller <mueller@kde.org>
@ -2071,15 +2071,15 @@ void DominoStyle::renderGradient(TQPainter *painter,
int rDiff, gDiff, bDiff;
int rc, gc, bc;
register int x, y;
int x, y;
rDiff = ( c2.red()) - (rc = c1.red());
gDiff = ( c2.green()) - (gc = c1.green());
bDiff = ( c2.blue()) - (bc = c1.blue());
register int rl = rc << 16;
register int gl = gc << 16;
register int bl = bc << 16;
int rl = rc << 16;
int gl = gc << 16;
int bl = bc << 16;
int rdelta = ((1<<16) / (horizontal ? r_h : r_w)) * rDiff;
int gdelta = ((1<<16) / (horizontal ? r_h : r_w)) * gDiff;
@ -7613,14 +7613,14 @@ void DominoStyle::drawFocusIndicator(TQPainter *p, const TQRect &r, int flags, c
XImage* xi = XGetImage( tqt_xdisplay(), pixm->handle(), 0, 0, width, height, AllPlanes, ZPixmap );
register int alpha;
register float AXIS_FACTOR = 2.0;
register float DIAGONAL_FACTOR = 1.0;
register double alphaShadow;
register int customalpha = isButton ? focusIndicatorSettings.buttonOpacity : focusIndicatorSettings.opacity;
int alpha;
float AXIS_FACTOR = 2.0;
float DIAGONAL_FACTOR = 1.0;
double alphaShadow;
int customalpha = isButton ? focusIndicatorSettings.buttonOpacity : focusIndicatorSettings.opacity;
for(register uint x = 1; x < width-1; ++x) {
for(register uint y = 1; y < height-1; ++y) {
for(uint x = 1; x < width-1; ++x) {
for(uint y = 1; y < height-1; ++y) {
alphaShadow = (tqBlue(XGetPixel(xi,x-1,y-1)) * DIAGONAL_FACTOR +
tqBlue(XGetPixel(xi,x-1,y )) * AXIS_FACTOR +
@ -7668,9 +7668,9 @@ TQPixmap DominoStyle::renderOutlineIcon(const TQPixmap* icon) const
TQImage outlineIcon(img.width()+2, img.height()+2, 32);
outlineIcon.setAlphaBuffer(true);
register unsigned int *outlineIconData = (unsigned int*) outlineIcon.bits();
register uint total = outlineIcon.width()*outlineIcon.height();
for (register uint current = 0 ; current < total ; ++current ) {
unsigned int *outlineIconData = (unsigned int*) outlineIcon.bits();
uint total = outlineIcon.width()*outlineIcon.height();
for (uint current = 0 ; current < total ; ++current ) {
outlineIconData[ current ] = 0x00000000;
}
@ -7683,8 +7683,8 @@ TQPixmap DominoStyle::renderOutlineIcon(const TQPixmap* icon) const
bitBlt(&outlineIcon, 1, 2, &img);
bitBlt(&outlineIcon, 2, 2, &img);
register uint customalpha = focusIndicatorSettings.buttonOpacity;
for (register uint current = 0 ; current < total ; ++current ) {
uint customalpha = focusIndicatorSettings.buttonOpacity;
for (uint current = 0 ; current < total ; ++current ) {
outlineIconData[ current ] = tqRgba( focusIndicatorSettings.buttonColor.red(), focusIndicatorSettings.buttonColor.green(), focusIndicatorSettings.buttonColor.blue(), tqAlpha(outlineIconData[ current ]) * customalpha >> 8);
}
@ -7777,10 +7777,10 @@ void DominoStyle::dominoDrawItem( TQPainter *p, const TQRect &r,
axi->data = (char *) malloc((unsigned) axi->bytes_per_line * height);
XImage* xi = XGetImage( tqt_xdisplay(), pixm->handle(), 0, 0, width, height, AllPlanes, ZPixmap );
register int alpha;
register int customalpha = buttonTextEffect ? textEffectSettings.buttonOpacity : textEffectSettings.opacity;
for(register uint y = 0; y < height; ++y) {
for(register uint x = 0; x < width; ++x) {
int alpha;
int customalpha = buttonTextEffect ? textEffectSettings.buttonOpacity : textEffectSettings.opacity;
for(uint y = 0; y < height; ++y) {
for(uint x = 0; x < width; ++x) {
alpha = (XGetPixel(xi, x, y)& 0xff ) * customalpha >> 8; // blue as alpha
XPutPixel(axi, x, y, alpha);
}
@ -7888,9 +7888,9 @@ void DominoStyle::updateTabWidgetFrame() {
TQPixmap DominoStyle::disableIcon(const TQPixmap* icon) const {
TQImage img = icon->convertToImage();
register uint pixels = img.depth() > 8 ? img.width()*img.height() : img.numColors();
register uint *data = img.depth() > 8 ? (unsigned int *)img.bits() : (unsigned int *)img.colorTable();
register uint val, i;
uint pixels = img.depth() > 8 ? img.width()*img.height() : img.numColors();
uint *data = img.depth() > 8 ? (unsigned int *)img.bits() : (unsigned int *)img.colorTable();
uint val, i;
for(i=0; i < pixels; ++i){
val = tqGray(data[i]);
data[i] = tqRgba(val, val, val, tqAlpha(data[i]));

@ -77,9 +77,9 @@ TQImage tintImage(const TQImage &img, const TQColor &tintColor) {
TQImage *result = new TQImage(img.width(), img.height(), 32, 0, TQImage::IgnoreEndian);
result->setAlphaBuffer( true );
register uint *data = (unsigned int*) img.bits();
register uint *resultData = (unsigned int*) result->bits();
register uint total = img.width()*img.height();
uint *data = (unsigned int*) img.bits();
uint *resultData = (unsigned int*) result->bits();
uint total = img.width()*img.height();
for ( uint current = 0 ; current < total ; ++current ) {
resultData[ current ] = tqRgba( tintColor.red(), tintColor.green(), tintColor.blue(), tqAlpha( data[ current ] ));
}
@ -89,10 +89,10 @@ TQImage tintImage(const TQImage &img, const TQColor &tintColor) {
TQImage setImageOpacity(const TQImage &img, const uint &p) {
TQImage *result = new TQImage(img.width(), img.height(), 32, 0, TQImage::IgnoreEndian);
result->setAlphaBuffer( true );
register uint *data = (unsigned int*) img.bits();
register uint *resultData = (unsigned int*) result->bits();
register uint alpha;
register uint total = img.width()*img.height();
uint *data = (unsigned int*) img.bits();
uint *resultData = (unsigned int*) result->bits();
uint alpha;
uint total = img.width()*img.height();
for ( uint current = 0 ; current < total ; ++current ) {
alpha = tqAlpha( data[ current ] ) * p / 100;
resultData[ current ] = tqRgba( tqRed( data[ current ] ), tqGreen( data[ current ] ), tqBlue( data[ current ] ), alpha );
@ -115,9 +115,9 @@ bool blend( const TQImage & upper, const TQImage & lower, TQImage & output)
output = lower.copy();
uchar *i, *o;
register uint a, ab, ac;
register uint col;
register uint w = upper.width();
uint a, ab, ac;
uint col;
uint w = upper.width();
int row(upper.height() - 1);
do

Loading…
Cancel
Save