mirror of
https://github.com/holub/mame
synced 2025-04-26 18:23:08 +03:00
prune upfront - makes the other stuff cheaper (nw)
This commit is contained in:
parent
daec33cb61
commit
11fa3800f3
@ -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());
|
||||
|
Loading…
Reference in New Issue
Block a user