diff options
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); } |