diff --git a/src/emu/debug/dvmemory.cpp b/src/emu/debug/dvmemory.cpp index 33efa5edba8..1d735293b6e 100644 --- a/src/emu/debug/dvmemory.cpp +++ b/src/emu/debug/dvmemory.cpp @@ -165,22 +165,16 @@ void debug_view_memory::enumerate_sources() void *base; std::string name_string(machine().save().indexed_item(itemnum, base, valsize, valcount)); - itemnames.emplace_back(std::move(name_string), base, valsize, valcount); + // add pretty much anything that's not a timer (we may wish to cull other items later) + // also, don't trim the front of the name, it's important to know which VIA6522 we're looking at, e.g. + if (strncmp(name_string.c_str(), "timer/", 6)) + itemnames.emplace_back(std::move(name_string), base, valsize, valcount); } std::sort(itemnames.begin(), itemnames.end(), [] (auto const &x, auto const &y) { return std::get<0>(x) < std::get<0>(y); }); for (auto const &item : itemnames) - { - const char *itemname = std::get<0>(item).c_str(); - - // add pretty much anything that's not a timer (we may wish to cull other items later) - // also, don't trim the front of the name, it's important to know which VIA6522 we're looking at, e.g. - if (strncmp(itemname, "timer/", 6)) - { - m_source_list.append(*global_alloc(debug_view_memory_source(itemname, std::get<1>(item), std::get<2>(item), std::get<3>(item)))); - } - } + m_source_list.append(*global_alloc(debug_view_memory_source(std::get<0>(item).c_str(), std::get<1>(item), std::get<2>(item), std::get<3>(item)))); // reset the source to a known good entry set_source(*m_source_list.first());