diff options
| author | Lioncash <mathew1800@gmail.com> | 2015-03-24 09:37:20 -0400 |
|---|---|---|
| committer | Lioncash <mathew1800@gmail.com> | 2015-03-24 14:09:33 -0400 |
| commit | 5ada887f94b5a571446c65bd4f1e9298dd8e2fea (patch) | |
| tree | 7ec93e11da5c5e4c7b05b9e8647fae628ce068a5 /Source/Core/DolphinWX/Debugger/DSPRegisterView.cpp | |
| parent | 01cb364c7a93500ce2fb22c4222947dabbdd0696 (diff) | |
DolphinWX: Get rid of wxGrid-based casts in the debugger.
This technically also fixes a memory leak in WatchView.cpp, because the table setting was done such that the grid wouldn't take ownership of the table, which means said table wouldn't be deleted in the grid's destructor.
Diffstat (limited to 'Source/Core/DolphinWX/Debugger/DSPRegisterView.cpp')
| -rw-r--r-- | Source/Core/DolphinWX/Debugger/DSPRegisterView.cpp | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/Source/Core/DolphinWX/Debugger/DSPRegisterView.cpp b/Source/Core/DolphinWX/Debugger/DSPRegisterView.cpp index e62bfcb781..0eece2d15c 100644 --- a/Source/Core/DolphinWX/Debugger/DSPRegisterView.cpp +++ b/Source/Core/DolphinWX/Debugger/DSPRegisterView.cpp @@ -77,7 +77,9 @@ wxGridCellAttr *CDSPRegTable::GetAttr(int row, int col, wxGridCellAttr::wxAttrKi DSPRegisterView::DSPRegisterView(wxWindow *parent, wxWindowID id) : wxGrid(parent, id, wxDefaultPosition, wxSize(130, 120)) { - SetTable(new CDSPRegTable(), true); + m_register_table = new CDSPRegTable(); + + SetTable(m_register_table, true); SetRowLabelSize(0); SetColLabelSize(0); DisableDragRowSize(); @@ -87,6 +89,6 @@ DSPRegisterView::DSPRegisterView(wxWindow *parent, wxWindowID id) void DSPRegisterView::Update() { - ((CDSPRegTable *)GetTable())->UpdateCachedRegs(); + m_register_table->UpdateCachedRegs(); ForceRefresh(); } |
