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/debugvw.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/debugvw.cpp')
-rw-r--r-- | src/emu/debug/debugvw.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/emu/debug/debugvw.cpp b/src/emu/debug/debugvw.cpp index 641a31b41f0..135ac5fb76e 100644 --- a/src/emu/debug/debugvw.cpp +++ b/src/emu/debug/debugvw.cpp @@ -231,9 +231,9 @@ void debug_view::set_source(const debug_view_source &source) const debug_view_source *debug_view::source_for_device(device_t *device) const { - for (debug_view_source *source = m_source_list.first(); source != nullptr; source = source->next()) - if (device == source->device()) - return source; + for (debug_view_source &source : m_source_list) + if (device == source.device()) + return &source; return m_source_list.first(); } |