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/schedule.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/schedule.cpp')
| -rw-r--r-- | src/emu/schedule.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/emu/schedule.cpp b/src/emu/schedule.cpp index e0bc57c2fff..2e87a62b06f 100644 --- a/src/emu/schedule.cpp +++ b/src/emu/schedule.cpp @@ -726,8 +726,8 @@ void device_scheduler::compute_perfect_interleave() { // adjust all the actuals; this doesn't affect the current m_quantum_minimum = perfect; - for (quantum_slot *quant = m_quantum_list.first(); quant != nullptr; quant = quant->next()) - quant->m_actual = MAX(quant->m_requested, m_quantum_minimum); + for (quantum_slot &quant : m_quantum_list) + quant.m_actual = MAX(quant.m_requested, m_quantum_minimum); } } } @@ -742,7 +742,7 @@ void device_scheduler::compute_perfect_interleave() void device_scheduler::rebuild_execute_list() { // if we haven't yet set a scheduling quantum, do it now - if (m_quantum_list.first() == nullptr) + if (m_quantum_list.empty()) { // set the core scheduling quantum attotime min_quantum = machine().config().m_minimum_quantum; |
