Removed explicit usage of the 'register' keyword.

Signed-off-by: Michele Calgaro <michele.calgaro@yahoo.it>
(cherry picked from commit 57ef93c0c4)
r14.0.x
Michele Calgaro 4 years ago
parent fa3efc1b26
commit 8269d6d9e5
Signed by: MicheleC
GPG Key ID: 2A75B7CA8ADED5CF

@ -37,7 +37,7 @@ inline void Bitmap<Type>::addPixel(int x, int y, int br1, int br2)
{
if (x < 0 || x >= width || y < 0 || y >= height) return;
register unsigned char *p = output+x*2+y*width*2;
unsigned char *p = output+x*2+y*width*2;
if (p[0] < 255-br1) p[0] += br1; else p[0] = 255;
if (p[1] < 255-br2) p[1] += br2; else p[1] = 255;
}
@ -64,7 +64,7 @@ void Bitmap<Type>::addVertLine(int x, int y1, int y2, int br1, int br2)
template <class Type>
void Bitmap<Type>::fadeStar()
{
register unsigned long *ptr = (unsigned long*)output;
unsigned long *ptr = (unsigned long*)output;
int i = width*height*2/4;
do
{
@ -238,7 +238,7 @@ void SDLView::repaint()
SDL_LockSurface(surface);
TEST();
register unsigned long *ptr2 = (unsigned long*)output2;
unsigned long *ptr2 = (unsigned long*)output2;
unsigned long *ptr1 = (unsigned long*)( surface->pixels );
int i = width*height/4;
TEST();
@ -246,12 +246,12 @@ void SDLView::repaint()
do {
// Asger Alstrup Nielsen's (alstrup@diku.dk)
// optimized 32 bit screen loop
register unsigned int const r1 = *(ptr2++);
register unsigned int const r2 = *(ptr2++);
unsigned int const r1 = *(ptr2++);
unsigned int const r2 = *(ptr2++);
//if (r1 || r2) {
#ifdef LITTLEENDIAN
register unsigned int const v =
unsigned int const v =
((r1 & 0x000000f0ul) >> 4)
| ((r1 & 0x0000f000ul) >> 8)
| ((r1 & 0x00f00000ul) >> 12)
@ -262,7 +262,7 @@ void SDLView::repaint()
| ((r2 & 0x00f00000ul) << 4)
| ((r2 & 0xf0000000ul)));
#else
register unsigned int const v =
unsigned int const v =
((r2 & 0x000000f0ul) >> 4)
| ((r2 & 0x0000f000ul) >> 8)
| ((r2 & 0x00f00000ul) >> 12)

@ -94,21 +94,21 @@ void Input::getAudio(float **audio)
std::vector<float> *left, *right;
mScope->scopeData(left, right);
register float *inleft=&*left->begin();
register float *inright=&*right->begin();
float *inleft=&*left->begin();
float *inright=&*right->begin();
int offset=0;
if (mConvolve)
{ // find the offset
for (register int i=0; i<512+256; ++i)
for (int i=0; i<512+256; ++i)
temp[i]=inleft[i]+inright[i];
offset=::convolve_match(haystack, temp, state);
if (offset==-1) offset=0;
inleft+=offset;
inright+=offset;
for (register int i=0; i<512; ++i)
for (int i=0; i<512; ++i)
{
haystack[i]*=.5;
haystack[i]+=temp[i+offset];

@ -334,7 +334,7 @@ Bitmap *RendererList::render(float *pcm[4], Bitmap *source)
while (d<end)
{
register int dest=*d;
int dest=*d;
if (dest && ((dest | *s) & 128))
{
// there's danger of going past 0xFF

@ -98,7 +98,7 @@ public:
inline void drawVerticalLine(int x, int yBottom, int yTop, Pixel c)
{
register int w=width;
int w=width;
Pixel *d=mData+x+yTop*w;
yBottom-=yTop;
do

@ -30,7 +30,7 @@ structQt::HorizontalPair : public Renderer
}
static inline void processV(int h, int start, int end, Bitmap *d,
float *ch, Pixel c, register bool solid)
float *ch, Pixel c, bool solid)
{
int oldx=(start+end)/2;
int mid=oldx;
@ -50,7 +50,7 @@ structQt::HorizontalPair : public Renderer
}
static inline void processH(int h, int start, int end, Bitmap *d,
float *ch, Pixel c, register bool solid)
float *ch, Pixel c, bool solid)
{
int oldx=(start+end)/2;
int mid=oldx;
@ -143,9 +143,9 @@ class Fade : public Renderer
public:
virtual Bitmap *render(float *[2], Bitmap *src)
{
register int i=src->bytes()/sizeof(Pixel);
int i=src->bytes()/sizeof(Pixel);
register Pixel *d=src->pixels();
Pixel *d=src->pixels();
do
{
*d -= ((*d & 0xf0f0f0f0) >> 4) +
@ -208,8 +208,8 @@ struct Blur : public Renderer
{
Bitmap *b=nex->bitmapPool()->get();
register Byte *buffer=(Byte*)b->pixels();
register unsigned short pitch=width*sizeof(Pixel);
Byte *buffer=(Byte*)b->pixels();
unsigned short pitch=width*sizeof(Pixel);
// skip the first row
buffer+=pitch;
@ -218,7 +218,7 @@ struct Blur : public Renderer
buffer+=sizeof(Pixel);
// we also don't want to do the last row
register Pixel *end=b->lastPixel();
Pixel *end=b->lastPixel();
end-=pitch;
// and the last pixel on the second-to-last row
end-=sizeof(Pixel);

@ -119,7 +119,7 @@ void Core::addPixelFast(unsigned char *p,int br1,int br2)
void Core::fadeFade()
{
register unsigned long *ptr = (unsigned long*)output();
unsigned long *ptr = (unsigned long*)output();
int i = outWidth*outHeight*2/4;
do {
//Bytewize version was: *(ptr++) -= *ptr+(*ptr>>1)>>4;
@ -306,7 +306,7 @@ bool Core::calculate()
int clarity[NumSamples]; //Surround sound
int i,j,k;
#ifndef LITTLEENDIAN
register sampleType temp;
sampleType temp;
#endif

@ -150,19 +150,19 @@ void SdlScreen::show()
{
SDL_LockSurface(surface);
register unsigned long *ptr2 = (unsigned long*)core->output();
unsigned long *ptr2 = (unsigned long*)core->output();
unsigned long *ptr1 = (unsigned long*)( surface->pixels );
int i = core->outWidth*core->outHeight/4;
do {
// Asger Alstrup Nielsen's (alstrup@diku.dk)
// optimized 32 bit screen loop
register unsigned int const r1 = *(ptr2++);
register unsigned int const r2 = *(ptr2++);
unsigned int const r1 = *(ptr2++);
unsigned int const r2 = *(ptr2++);
//if (r1 || r2) {
#ifdef LITTLEENDIAN
register unsigned int const v =
unsigned int const v =
((r1 & 0x000000f0ul) >> 4)
| ((r1 & 0x0000f000ul) >> 8)
| ((r1 & 0x00f00000ul) >> 12)
@ -173,7 +173,7 @@ void SdlScreen::show()
| ((r2 & 0x00f00000ul) << 4)
| ((r2 & 0xf0000000ul)));
#else
register unsigned int const v =
unsigned int const v =
((r2 & 0x000000f0ul) >> 4)
| ((r2 & 0x0000f000ul) >> 8)
| ((r2 & 0x00f00000ul) >> 12)

@ -115,7 +115,7 @@ inline void Core::addPixelFast(unsigned char *p,int br1,int br2)
void Core::fadeFade()
{
register unsigned long *ptr = (unsigned long*)output();
unsigned long *ptr = (unsigned long*)output();
int i = outWidth*outHeight*2/4;
do {
//Bytewize version was: *(ptr++) -= *ptr+(*ptr>>1)>>4;
@ -303,7 +303,7 @@ bool Core::calculate()
int clarity[NumSamples]; //Surround sound
int i,j,k;
#ifndef LITTLEENDIAN
register sampleType temp;
sampleType temp;
#endif
int brightFactor = int(Brightness * brightnessTwiddler /(starSize+0.01));

@ -142,19 +142,19 @@ int SdlScreen::sizeUpdate(void) { return 0; }
void SdlScreen::show(void) {
SDL_LockSurface(surface);
register unsigned long *ptr2 = (unsigned long*)core->output();
unsigned long *ptr2 = (unsigned long*)core->output();
unsigned long *ptr1 = (unsigned long*)( surface->pixels );
int i = core->outWidth*core->outHeight/4;
do {
// Asger Alstrup Nielsen's (alstrup@diku.dk)
// optimized 32 bit screen loop
register unsigned int const r1 = *(ptr2++);
register unsigned int const r2 = *(ptr2++);
unsigned int const r1 = *(ptr2++);
unsigned int const r2 = *(ptr2++);
//if (r1 || r2) {
#ifdef LITTLEENDIAN
register unsigned int const v =
unsigned int const v =
((r1 & 0x000000f0ul) >> 4)
| ((r1 & 0x0000f000ul) >> 8)
| ((r1 & 0x00f00000ul) >> 12)
@ -165,7 +165,7 @@ void SdlScreen::show(void) {
| ((r2 & 0x00f00000ul) << 4)
| ((r2 & 0xf0000000ul)));
#else
register unsigned int const v =
unsigned int const v =
((r2 & 0x000000f0ul) >> 4)
| ((r2 & 0x0000f000ul) >> 8)
| ((r2 & 0x00f00000ul) >> 12)

@ -79,7 +79,7 @@ void compute_surface(t_interpol* vector_field)
int add_dest=0;
int add_src;
t_interpol *interpol;
register byte* ptr_pix;
byte* ptr_pix;
int color;
byte* ptr_swap;

Loading…
Cancel
Save