From df0d4b6aea405c73aaba685e1e8fecbb183d56ba Mon Sep 17 00:00:00 2001 From: Lioncash Date: Mon, 15 Jul 2019 23:10:46 -0400 Subject: [PATCH 1/2] Core/HW/AddressSpace: Remove unnecessary inclusion of Core.h This is only included to satisfy the use of our type aliases. Given that, we can just include CommonTypes.h, lessening dependencies on core headers. --- Source/Core/Core/HW/AddressSpace.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Source/Core/Core/HW/AddressSpace.h b/Source/Core/Core/HW/AddressSpace.h index 42724df053..a02989010a 100644 --- a/Source/Core/Core/HW/AddressSpace.h +++ b/Source/Core/Core/HW/AddressSpace.h @@ -6,7 +6,7 @@ #include -#include "Core/Core.h" +#include "Common/CommonTypes.h" namespace AddressSpace { From 2b00eefbefa3d1c34f25886d4cb3c6c1295d0ad1 Mon Sep 17 00:00:00 2001 From: Lioncash Date: Mon, 15 Jul 2019 23:20:26 -0400 Subject: [PATCH 2/2] DolphinQt/Debugger: Replace AddressSpace.h inclusions with a forward declaration --- Source/Core/DolphinQt/Debugger/MemoryViewWidget.cpp | 1 + Source/Core/DolphinQt/Debugger/MemoryViewWidget.h | 8 ++++++-- Source/Core/DolphinQt/Debugger/MemoryWidget.cpp | 1 + Source/Core/DolphinQt/Debugger/MemoryWidget.h | 1 - 4 files changed, 8 insertions(+), 3 deletions(-) diff --git a/Source/Core/DolphinQt/Debugger/MemoryViewWidget.cpp b/Source/Core/DolphinQt/Debugger/MemoryViewWidget.cpp index 4284f60bc9..9769a420b4 100644 --- a/Source/Core/DolphinQt/Debugger/MemoryViewWidget.cpp +++ b/Source/Core/DolphinQt/Debugger/MemoryViewWidget.cpp @@ -15,6 +15,7 @@ #include #include "Core/Core.h" +#include "Core/HW/AddressSpace.h" #include "Core/PowerPC/BreakPoints.h" #include "Core/PowerPC/PowerPC.h" #include "DolphinQt/Resources.h" diff --git a/Source/Core/DolphinQt/Debugger/MemoryViewWidget.h b/Source/Core/DolphinQt/Debugger/MemoryViewWidget.h index 5537139f37..dcb4409fa7 100644 --- a/Source/Core/DolphinQt/Debugger/MemoryViewWidget.h +++ b/Source/Core/DolphinQt/Debugger/MemoryViewWidget.h @@ -7,7 +7,11 @@ #include #include "Common/CommonTypes.h" -#include "Core/HW/AddressSpace.h" + +namespace AddressSpace +{ +enum class Type; +} class MemoryViewWidget : public QTableWidget { @@ -59,7 +63,7 @@ private: void OnCopyAddress(); void OnCopyHex(); - AddressSpace::Type m_address_space = AddressSpace::Type::Effective; + AddressSpace::Type m_address_space{}; Type m_type = Type::U8; BPType m_bp_type = BPType::ReadWrite; bool m_do_log = true; diff --git a/Source/Core/DolphinQt/Debugger/MemoryWidget.cpp b/Source/Core/DolphinQt/Debugger/MemoryWidget.cpp index 3bfa69b293..63fb4264fc 100644 --- a/Source/Core/DolphinQt/Debugger/MemoryWidget.cpp +++ b/Source/Core/DolphinQt/Debugger/MemoryWidget.cpp @@ -23,6 +23,7 @@ #include "Common/File.h" #include "Common/FileUtil.h" #include "Core/ConfigManager.h" +#include "Core/HW/AddressSpace.h" #include "DolphinQt/Debugger/MemoryViewWidget.h" #include "DolphinQt/QtUtils/ModalMessageBox.h" #include "DolphinQt/Settings.h" diff --git a/Source/Core/DolphinQt/Debugger/MemoryWidget.h b/Source/Core/DolphinQt/Debugger/MemoryWidget.h index 071fbb998e..45f2a80bbf 100644 --- a/Source/Core/DolphinQt/Debugger/MemoryWidget.h +++ b/Source/Core/DolphinQt/Debugger/MemoryWidget.h @@ -9,7 +9,6 @@ #include #include "Common/CommonTypes.h" -#include "Core/HW/AddressSpace.h" class MemoryViewWidget; class QCheckBox;