diff options
author | Vas Crabb <vas@vastheman.com> | 2018-05-18 21:00:54 +1000 |
---|---|---|
committer | Vas Crabb <vas@vastheman.com> | 2018-05-18 21:00:54 +1000 |
commit | 11fa3800f3a3e3162ded5579a8991c91e76d661e (patch) | |
tree | 92f23856f484acd067a2fd09f3d2c7708e5c2950 | |
parent | daec33cb61fe0278faa31609ae01f1790d3bdfd6 (diff) |
prune upfront - makes the other stuff cheaper (nw)
-rw-r--r-- | src/emu/debug/dvmemory.cpp | 16 |
1 files changed, 5 insertions, 11 deletions
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()); |