From d56ade56aedf47f70e8c4c0eb3d8a986389d168b Mon Sep 17 00:00:00 2001 From: Kingcom Date: Sun, 22 Sep 2013 11:09:11 +0200 Subject: [PATCH] -don't use typedefs -clear functions on NotifyMapLoaded --- Windows/Debugger/CtrlDisAsmView.cpp | 12 ++++++------ Windows/Debugger/CtrlDisAsmView.h | 13 +++++++------ Windows/Debugger/Debugger_Disasm.cpp | 1 + 3 files changed, 14 insertions(+), 12 deletions(-) diff --git a/Windows/Debugger/CtrlDisAsmView.cpp b/Windows/Debugger/CtrlDisAsmView.cpp index e98ba88f66..4ab97b12e5 100644 --- a/Windows/Debugger/CtrlDisAsmView.cpp +++ b/Windows/Debugger/CtrlDisAsmView.cpp @@ -53,16 +53,16 @@ void CtrlDisAsmView::deinit() //UnregisterClass(szClassName, hInst) } - -typedef struct -{ - bool used; - u32 end; -} LaneInfo; #define NUM_LANES 16 void CtrlDisAsmView::scanFunctions() { + struct LaneInfo + { + bool used; + u32 end; + }; + u32 pos = windowStart; u32 windowEnd = windowStart+visibleRows*instructionSize; diff --git a/Windows/Debugger/CtrlDisAsmView.h b/Windows/Debugger/CtrlDisAsmView.h index 3fce21cf3d..1c3c7f38ab 100644 --- a/Windows/Debugger/CtrlDisAsmView.h +++ b/Windows/Debugger/CtrlDisAsmView.h @@ -28,21 +28,21 @@ using std::min; using std::max; -typedef enum { LINE_UP, LINE_DOWN, LINE_RIGHT } LineType; +enum LineType { LINE_UP, LINE_DOWN, LINE_RIGHT }; -typedef struct +struct BranchLine { u32 first; u32 second; LineType type; int laneIndex; -} BranchLine; +}; -typedef struct +struct DisassemblyFunction { u32 hash; std::vector lines; -} DisassemblyFunction; +}; class CtrlDisAsmView { @@ -119,7 +119,8 @@ public: bool curAddressIsVisible(); void redraw(); void scanFunctions(); - + void clearFunctions() { functions.clear(); }; + void getOpcodeText(u32 address, char* dest); u32 yToAddress(int y); diff --git a/Windows/Debugger/Debugger_Disasm.cpp b/Windows/Debugger/Debugger_Disasm.cpp index ab7874e465..db4f40f677 100644 --- a/Windows/Debugger/Debugger_Disasm.cpp +++ b/Windows/Debugger/Debugger_Disasm.cpp @@ -845,6 +845,7 @@ void CDisasm::NotifyMapLoaded() { symbolMap.FillSymbolListBox(GetDlgItem(m_hDlg, IDC_FUNCTIONLIST),ST_FUNCTION); CtrlDisAsmView *ptr = CtrlDisAsmView::getFrom(GetDlgItem(m_hDlg,IDC_DISASMVIEW)); + ptr->clearFunctions(); ptr->redraw(); }