diff options
| author | 2017-12-01 05:34:53 +1100 | |
|---|---|---|
| committer | 2017-12-01 05:34:53 +1100 | |
| commit | 199f92a2b0fa29da5ce52fce8114a4331dd3466b (patch) | |
| tree | 308c7f414d3410b0862a57b05c971724ce36b65a /src/emu/debug/debugcmd.h | |
| parent | 19addd3df55fd79735653c6894835c4ac5fce45c (diff) | |
(nw) misc cleanup: start replacing auto_alloc_* with smart pointers, get
rid of reference constants in the debugger in favour of capturing the
value in the bind/lambda (less ugly casting)
Diffstat (limited to 'src/emu/debug/debugcmd.h')
| -rw-r--r-- | src/emu/debug/debugcmd.h | 18 |
1 files changed, 10 insertions, 8 deletions
diff --git a/src/emu/debug/debugcmd.h b/src/emu/debug/debugcmd.h index 7eca669908e..98b6d8ae03d 100644 --- a/src/emu/debug/debugcmd.h +++ b/src/emu/debug/debugcmd.h @@ -37,8 +37,10 @@ public: private: struct global_entry { - void * base; - u32 size; + global_entry() { } + + void * base = nullptr; + u32 size = 0; }; @@ -79,12 +81,12 @@ private: u64 cheat_byte_swap(const cheat_system *cheatsys, u64 value); u64 cheat_read_extended(const cheat_system *cheatsys, address_space &space, offs_t address); - u64 execute_min(symbol_table &table, void *ref, int params, const u64 *param); - u64 execute_max(symbol_table &table, void *ref, int params, const u64 *param); - u64 execute_if(symbol_table &table, void *ref, int params, const u64 *param); + u64 execute_min(symbol_table &table, int params, const u64 *param); + u64 execute_max(symbol_table &table, int params, const u64 *param); + u64 execute_if(symbol_table &table, int params, const u64 *param); - u64 global_get(symbol_table &table, void *ref); - void global_set(symbol_table &table, void *ref, u64 value); + u64 global_get(symbol_table &table, global_entry *global); + void global_set(symbol_table &table, global_entry *global, u64 value); int mini_printf(char *buffer, const char *format, int params, u64 *param); @@ -162,7 +164,7 @@ private: debugger_cpu& m_cpu; debugger_console& m_console; - global_entry *m_global_array; + std::unique_ptr<global_entry []> m_global_array; cheat_system m_cheat; static const size_t MAX_GLOBALS; |
