diff options
| author | 2019-11-18 05:08:36 +1100 | |
|---|---|---|
| committer | 2019-11-18 05:08:36 +1100 | |
| commit | 88ce545cdda64659894b87fc0b98e1b044eea3e0 (patch) | |
| tree | 9a1f05f459b773c70a2ef64443cbe8fee2a3ccd1 /src/emu/debug/dvbpoints.cpp | |
| parent | 1fbfa9e071fe1824ea47c567c23778d8ab33cacf (diff) | |
misc cleanup:
* Got rid of some more simple_list in core debugger code
* Fixed a buffer overrun in wavwrite (buffer half requried size)
* Slightly reduced dependencies and overhead in wavwrite
* Made new disassembly windows in Qt debugger default to current CPU
Diffstat (limited to 'src/emu/debug/dvbpoints.cpp')
| -rw-r--r-- | src/emu/debug/dvbpoints.cpp | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/src/emu/debug/dvbpoints.cpp b/src/emu/debug/dvbpoints.cpp index d86ce1150cc..51b9fcffcf7 100644 --- a/src/emu/debug/dvbpoints.cpp +++ b/src/emu/debug/dvbpoints.cpp @@ -96,7 +96,7 @@ debug_view_breakpoints::debug_view_breakpoints(running_machine &machine, debug_v { // fail if no available sources enumerate_sources(); - if (m_source_list.count() == 0) + if (m_source_list.empty()) throw std::bad_alloc(); } @@ -118,18 +118,19 @@ debug_view_breakpoints::~debug_view_breakpoints() void debug_view_breakpoints::enumerate_sources() { // start with an empty list - m_source_list.reset(); + m_source_list.clear(); // iterate over devices with disassembly interfaces for (device_disasm_interface &dasm : disasm_interface_iterator(machine().root_device())) { std::string name; name = string_format("%s '%s'", dasm.device().name(), dasm.device().tag()); - m_source_list.append(*global_alloc(debug_view_source(name.c_str(), &dasm.device()))); + m_source_list.emplace_back(std::make_unique<debug_view_source>(name.c_str(), &dasm.device())); } // reset the source to a known good entry - set_source(*m_source_list.first()); + if (!m_source_list.empty()) + set_source(*m_source_list[0]); } @@ -189,10 +190,10 @@ void debug_view_breakpoints::pad_ostream_to_length(std::ostream& str, int len) void debug_view_breakpoints::gather_breakpoints() { m_buffer.resize(0); - for (const debug_view_source &source : m_source_list) + for (auto &source : m_source_list) { // Collect - device_debug &debugInterface = *source.device()->debug(); + device_debug &debugInterface = *source->device()->debug(); for (const device_debug::breakpoint &bp : debugInterface.breakpoint_list()) m_buffer.push_back(&bp); } |
