CDVD: Cleanup variable scope.

Codacy.
This commit is contained in:
lightningterror 2022-06-24 17:53:43 +02:00
parent 8586490162
commit 732d30c919
3 changed files with 8 additions and 10 deletions

View File

@ -785,12 +785,12 @@ static uint cdvdRotationalLatency(CDVD_MODE_TYPE mode)
static uint cdvdBlockReadTime(CDVD_MODE_TYPE mode)
{
int numSectors = 0;
int offset = 0;
// CAV Read speed is roughly 41% in the centre full speed on outer edge. I imagine it's more logarithmic than this
if (cdvd.SpindlCtrl & CDVD_SPINDLE_CAV)
{
int numSectors = 0;
int offset = 0;
// Sector counts are taken from google for Single layer, Dual layer DVD's and for 700MB CD's
switch (cdvd.Type)
{

View File

@ -97,19 +97,18 @@ int InputIsoFile::FinishRead3(u8* dst, uint mode)
if (m_current_lsn >= m_blocks)
return 0;
int _offset = 0;
int length = 0;
int ret = 0;
if (m_read_inprogress)
{
ret = m_reader->FinishRead();
const int ret = m_reader->FinishRead();
m_read_inprogress = false;
if (ret < 0)
return ret;
}
int _offset = 0;
int length = 0;
switch (mode)
{
case CDVD_MODE_2352:

View File

@ -72,7 +72,6 @@ void ThreadedFileReader::Loop()
if (m_quit)
return;
void* ptr;
u64 requestOffset;
u32 requestSize;
@ -81,7 +80,7 @@ void ThreadedFileReader::Loop()
for (;;)
{
ptr = m_requestPtr.load(std::memory_order_acquire);
void* ptr = m_requestPtr.load(std::memory_order_acquire);
requestOffset = m_requestOffset;
requestSize = m_requestSize;
lock.unlock();