From 24df509447eb9b6d70fd3d0ea010bae4ff8e4cd8 Mon Sep 17 00:00:00 2001 From: Pokechu22 Date: Thu, 2 Feb 2023 15:24:29 -0800 Subject: [PATCH] =?UTF-8?q?DVDInterface:=20Fix=20warning:=20declaration=20?= =?UTF-8?q?of=20=E2=80=98state=E2=80=99=20shadows=20a=20previous=20local?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Source/Core/Core/HW/DVD/DVDInterface.cpp | 30 ++++++++++++------------ 1 file changed, 15 insertions(+), 15 deletions(-) diff --git a/Source/Core/Core/HW/DVD/DVDInterface.cpp b/Source/Core/Core/HW/DVD/DVDInterface.cpp index d3277914c1..d1c8cd164e 100644 --- a/Source/Core/Core/HW/DVD/DVDInterface.cpp +++ b/Source/Core/Core/HW/DVD/DVDInterface.cpp @@ -647,24 +647,24 @@ void RegisterMMIO(MMIO::Mapping* mmio, u32 base, bool is_wii) auto& state = Core::System::GetInstance().GetDVDInterfaceState().GetData(); mmio->Register(base | DI_STATUS_REGISTER, MMIO::DirectRead(&state.DISR.Hex), MMIO::ComplexWrite([](Core::System& system, u32, u32 val) { - auto& state = system.GetDVDInterfaceState().GetData(); + auto& state_ = system.GetDVDInterfaceState().GetData(); const UDISR tmp_status_reg(val); - state.DISR.DEINTMASK = tmp_status_reg.DEINTMASK.Value(); - state.DISR.TCINTMASK = tmp_status_reg.TCINTMASK.Value(); - state.DISR.BRKINTMASK = tmp_status_reg.BRKINTMASK.Value(); - state.DISR.BREAK = tmp_status_reg.BREAK.Value(); + state_.DISR.DEINTMASK = tmp_status_reg.DEINTMASK.Value(); + state_.DISR.TCINTMASK = tmp_status_reg.TCINTMASK.Value(); + state_.DISR.BRKINTMASK = tmp_status_reg.BRKINTMASK.Value(); + state_.DISR.BREAK = tmp_status_reg.BREAK.Value(); if (tmp_status_reg.DEINT) - state.DISR.DEINT = 0; + state_.DISR.DEINT = 0; if (tmp_status_reg.TCINT) - state.DISR.TCINT = 0; + state_.DISR.TCINT = 0; if (tmp_status_reg.BRKINT) - state.DISR.BRKINT = 0; + state_.DISR.BRKINT = 0; - if (state.DISR.BREAK) + if (state_.DISR.BREAK) { DEBUG_ASSERT(0); } @@ -674,13 +674,13 @@ void RegisterMMIO(MMIO::Mapping* mmio, u32 base, bool is_wii) mmio->Register(base | DI_COVER_REGISTER, MMIO::DirectRead(&state.DICVR.Hex), MMIO::ComplexWrite([](Core::System& system, u32, u32 val) { - auto& state = system.GetDVDInterfaceState().GetData(); + auto& state_ = system.GetDVDInterfaceState().GetData(); const UDICVR tmp_cover_reg(val); - state.DICVR.CVRINTMASK = tmp_cover_reg.CVRINTMASK.Value(); + state_.DICVR.CVRINTMASK = tmp_cover_reg.CVRINTMASK.Value(); if (tmp_cover_reg.CVRINT) - state.DICVR.CVRINT = 0; + state_.DICVR.CVRINT = 0; UpdateInterrupts(); })); @@ -712,9 +712,9 @@ void RegisterMMIO(MMIO::Mapping* mmio, u32 base, bool is_wii) MMIO::DirectWrite(&state.DILENGTH, ~0x1F)); mmio->Register(base | DI_DMA_CONTROL_REGISTER, MMIO::DirectRead(&state.DICR.Hex), MMIO::ComplexWrite([](Core::System& system, u32, u32 val) { - auto& state = system.GetDVDInterfaceState().GetData(); - state.DICR.Hex = val & 7; - if (state.DICR.TSTART) + auto& state_ = system.GetDVDInterfaceState().GetData(); + state_.DICR.Hex = val & 7; + if (state_.DICR.TSTART) { ExecuteCommand(ReplyType::Interrupt); }