summaryrefslogtreecommitdiffstatshomepage
path: root/src/emu/diexec.cpp
diff options
context:
space:
mode:
author AJR <ajrhacker@users.noreply.github.com>2016-04-18 18:53:28 -0400
committer AJR <ajrhacker@users.noreply.github.com>2016-04-18 18:53:28 -0400
commit084d3654ca14a79d9ec173bad4ddf00ad0fb5a7f (patch)
tree197ae37b68f3169048fb3cadf6947353315f3608 /src/emu/diexec.cpp
parent55d3e544e013174880c8f208264683aac6d711f9 (diff)
Iterate over devices C++11 style
Replace the old device_iterator and its specialized versions with functionally equivalent classes that use standard operators to yield references to devices/interfaces rather than pointers. With range-based for loops, they no longer have to be stored in named variables, though they can also be reused concurrently since the iteration state is now maintained by a subclass. Add a few more typical getters to device_t::subdevice_list.
Diffstat (limited to 'src/emu/diexec.cpp')
-rw-r--r--src/emu/diexec.cpp3
1 files changed, 1 insertions, 2 deletions
diff --git a/src/emu/diexec.cpp b/src/emu/diexec.cpp
index fb3011bc59f..b92a5a8b31c 100644
--- a/src/emu/diexec.cpp
+++ b/src/emu/diexec.cpp
@@ -476,8 +476,7 @@ void device_execute_interface::interface_pre_start()
m_driver_irq.bind_relative_to(*device().owner());
// fill in the initial states
- device_iterator iter(device().machine().root_device());
- int index = iter.indexof(*this);
+ int index = device_iterator(device().machine().root_device()).indexof(*this);
m_suspend = SUSPEND_REASON_RESET;
m_profiler = profile_type(index + PROFILER_DEVICE_FIRST);
m_inttrigger = index + TRIGGER_INT;