From 492b82042dd94791b8c42fc0d19daf013ee5b7ba Mon Sep 17 00:00:00 2001 From: Lioncash Date: Fri, 11 Nov 2016 13:20:47 -0500 Subject: [PATCH 1/2] CodeWindow: Remove unused parameter from constructor --- Source/Core/DolphinWX/Debugger/CodeWindow.cpp | 5 ++--- Source/Core/DolphinWX/Debugger/CodeWindow.h | 7 ++++--- Source/Core/DolphinWX/Frame.cpp | 2 +- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/Source/Core/DolphinWX/Debugger/CodeWindow.cpp b/Source/Core/DolphinWX/Debugger/CodeWindow.cpp index c39efe0047..6f0e215272 100644 --- a/Source/Core/DolphinWX/Debugger/CodeWindow.cpp +++ b/Source/Core/DolphinWX/Debugger/CodeWindow.cpp @@ -51,9 +51,8 @@ #include "DolphinWX/Globals.h" #include "DolphinWX/WxUtils.h" -CCodeWindow::CCodeWindow(const SConfig& _LocalCoreStartupParameter, CFrame* parent, wxWindowID id, - const wxPoint& position, const wxSize& size, long style, - const wxString& name) +CCodeWindow::CCodeWindow(CFrame* parent, wxWindowID id, const wxPoint& position, const wxSize& size, + long style, const wxString& name) : wxPanel(parent, id, position, size, style, name), m_sibling_panels(), Parent(parent), codeview(nullptr) { diff --git a/Source/Core/DolphinWX/Debugger/CodeWindow.h b/Source/Core/DolphinWX/Debugger/CodeWindow.h index b3f5bca191..452080fff0 100644 --- a/Source/Core/DolphinWX/Debugger/CodeWindow.h +++ b/Source/Core/DolphinWX/Debugger/CodeWindow.h @@ -75,9 +75,10 @@ struct DebugPanelToID class CCodeWindow : public wxPanel { public: - CCodeWindow(const SConfig& _LocalCoreStartupParameter, CFrame* parent, wxWindowID id = wxID_ANY, - const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, - long style = wxTAB_TRAVERSAL | wxBORDER_NONE, const wxString& name = _("Code")); + explicit CCodeWindow(CFrame* parent, wxWindowID id = wxID_ANY, + const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, + long style = wxTAB_TRAVERSAL | wxBORDER_NONE, + const wxString& name = _("Code")); ~CCodeWindow(); void Load(); diff --git a/Source/Core/DolphinWX/Frame.cpp b/Source/Core/DolphinWX/Frame.cpp index 7e50d93026..129cd16108 100644 --- a/Source/Core/DolphinWX/Frame.cpp +++ b/Source/Core/DolphinWX/Frame.cpp @@ -324,7 +324,7 @@ CFrame::CFrame(wxFrame* parent, wxWindowID id, const wxString& title, wxRect geo // Debugger class if (UseDebugger) { - g_pCodeWindow = new CCodeWindow(SConfig::GetInstance(), this, IDM_CODE_WINDOW); + g_pCodeWindow = new CCodeWindow(this, IDM_CODE_WINDOW); LoadIniPerspectives(); g_pCodeWindow->Load(); } From cd9520f458023e7e771b2feabc4bbb3fb2cfcf0b Mon Sep 17 00:00:00 2001 From: Lioncash Date: Fri, 11 Nov 2016 13:31:36 -0500 Subject: [PATCH 2/2] CodeWindow: In-class initialize variables where applicable --- Source/Core/DolphinWX/Debugger/CodeWindow.cpp | 3 +-- Source/Core/DolphinWX/Debugger/CodeWindow.h | 2 +- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/Source/Core/DolphinWX/Debugger/CodeWindow.cpp b/Source/Core/DolphinWX/Debugger/CodeWindow.cpp index 6f0e215272..1465437152 100644 --- a/Source/Core/DolphinWX/Debugger/CodeWindow.cpp +++ b/Source/Core/DolphinWX/Debugger/CodeWindow.cpp @@ -53,8 +53,7 @@ CCodeWindow::CCodeWindow(CFrame* parent, wxWindowID id, const wxPoint& position, const wxSize& size, long style, const wxString& name) - : wxPanel(parent, id, position, size, style, name), m_sibling_panels(), Parent(parent), - codeview(nullptr) + : wxPanel(parent, id, position, size, style, name), Parent(parent) { DebugInterface* di = &PowerPC::debug_interface; diff --git a/Source/Core/DolphinWX/Debugger/CodeWindow.h b/Source/Core/DolphinWX/Debugger/CodeWindow.h index 452080fff0..423e86d6eb 100644 --- a/Source/Core/DolphinWX/Debugger/CodeWindow.h +++ b/Source/Core/DolphinWX/Debugger/CodeWindow.h @@ -157,7 +157,7 @@ private: // Sibling debugger panels // FIXME: This obviously belongs in some manager class above this one. - std::array m_sibling_panels; + std::array m_sibling_panels{}; CFrame* Parent; CCodeView* codeview;