diff options
| author | 2016-03-31 09:43:53 -0400 | |
|---|---|---|
| committer | 2016-03-31 09:43:53 -0400 | |
| commit | a7e393b36b57cead61978f332135a509b2ddc82a (patch) | |
| tree | 4d0d9a4b83d394e8706bd0475f379b5f468c43b1 /src/emu/debug/debugcpu.cpp | |
| parent | 677cfa86fd8675dd15cc6cde0e26fd216823c61b (diff) | |
Iterate over core classes C++11 style
C++11 range-based for loops can now iterate over simple_list, tagged_list, core_options, device_t::subdevice_list, device_t::interface_list, render_primitive_list and all subclasses of the above, and much code has been refactored to use them. Most core classes that have these lists as members now have methods that return the lists themselves, replacing most of the methods that returned the object at an owned list's head. (A few have been retained due to their use in drivers or OSD.)
device_t now manages subdevice and interface lists through subclasses, but has given up the work of adding and removing subdevices to machine_config.
memory_manager has its tagged lists exposed, though the old rooted tag lookup methods have been removed (they were privatized already).
Diffstat (limited to 'src/emu/debug/debugcpu.cpp')
| -rw-r--r-- | src/emu/debug/debugcpu.cpp | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/src/emu/debug/debugcpu.cpp b/src/emu/debug/debugcpu.cpp index 4e59ed8a652..7e352e7dbe8 100644 --- a/src/emu/debug/debugcpu.cpp +++ b/src/emu/debug/debugcpu.cpp @@ -1666,9 +1666,10 @@ device_debug::device_debug(device_t &device) // add all registers into it std::string tempstr; - for (const device_state_entry *entry = m_state->state_first(); entry != nullptr; entry = entry->next()) { - strmakelower(tempstr.assign(entry->symbol())); - m_symtable.add(tempstr.c_str(), (void *)(FPTR)entry->index(), get_state, set_state); + for (const device_state_entry &entry : m_state->state_entries()) + { + strmakelower(tempstr.assign(entry.symbol())); + m_symtable.add(tempstr.c_str(), (void *)(FPTR)entry.index(), get_state, set_state); } } |
