Gif: Fix the scope of the variable can be reduced warnings.

Codacy.
This commit is contained in:
lightningterror 2024-05-08 13:41:56 +02:00
parent f0c331e32b
commit 4035f1c554
1 changed files with 2 additions and 5 deletions

View File

@ -119,10 +119,7 @@ int GIF_Fifo::read_fifo()
return 0;
}
int readpos = 0;
int sizeRead = 0;
sizeRead = gifUnit.TransferGSPacketData(GIF_TRANS_DMA, (u8*)&data, fifoSize * 16) / 16; //returns the size actually read
const int sizeRead = gifUnit.TransferGSPacketData(GIF_TRANS_DMA, (u8*)&data, fifoSize * 16) / 16; //returns the size actually read
GIF_LOG("GIF FIFO Read %d QW from FIFO Current Size %d", sizeRead, fifoSize);
@ -131,7 +128,7 @@ int GIF_Fifo::read_fifo()
if (sizeRead > 0)
{
const int copyAmount = fifoSize - sizeRead;
readpos = sizeRead * 4;
const int readpos = sizeRead * 4;
for (int i = 0; i < copyAmount; i++)
CopyQWC(&data[i * 4], &data[readpos + (i * 4)]);