From 60b8e27e2c4f0fcb45e33a3afe9333c12395eaec Mon Sep 17 00:00:00 2001 From: Nathan Woods Date: Fri, 3 Mar 2017 10:34:58 -0500 Subject: C++-ification of debugger code (misc std::string/std::vector adoption mainly) --- src/emu/debug/debugcon.cpp | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'src/emu/debug/debugcon.cpp') diff --git a/src/emu/debug/debugcon.cpp b/src/emu/debug/debugcon.cpp index 8cd565cbfa1..1a35ba3f61d 100644 --- a/src/emu/debug/debugcon.cpp +++ b/src/emu/debug/debugcon.cpp @@ -218,7 +218,10 @@ CMDERR debugger_console::internal_execute_command(bool execute, int params, char /* execute the handler */ if (execute) - found->handler(found->ref, params, (const char **)param); + { + std::vector params_vec(param, param + params); + found->handler(found->ref, params_vec); + } return CMDERR_NONE; } @@ -368,7 +371,7 @@ CMDERR debugger_console::validate_command(const char *command) register_command - register a command handler -------------------------------------------------*/ -void debugger_console::register_command(const char *command, u32 flags, int ref, int minparams, int maxparams, std::function handler) +void debugger_console::register_command(const char *command, u32 flags, int ref, int minparams, int maxparams, std::function &)> handler) { assert_always(m_machine.phase() == MACHINE_PHASE_INIT, "Can only call register_command() at init time!"); assert_always((m_machine.debug_flags & DEBUG_FLAG_ENABLED) != 0, "Cannot call register_command() when debugger is not running"); -- cgit v1.2.3