diff options
Diffstat (limited to 'src/devices/machine/ds2404.cpp')
-rw-r--r-- | src/devices/machine/ds2404.cpp | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/src/devices/machine/ds2404.cpp b/src/devices/machine/ds2404.cpp index 57f8fa62d8f..68082389cee 100644 --- a/src/devices/machine/ds2404.cpp +++ b/src/devices/machine/ds2404.cpp @@ -26,7 +26,7 @@ const device_type DS2404 = &device_creator<ds2404_device>; ds2404_device::ds2404_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) : device_t(mconfig, DS2404, "DS2404", tag, owner, clock, "ds2404", __FILE__), - device_nvram_interface(mconfig, *this), + device_nvram_interface(mconfig, *this), m_tick_timer(nullptr), m_ref_year(0), m_ref_month(0), m_ref_day(0), m_address(0), m_offset(0), m_end_offset(0), @@ -99,8 +99,8 @@ void ds2404_device::device_start() m_rtc[3] = (current_time >> 16) & 0xff; m_rtc[4] = (current_time >> 24) & 0xff; - for (int i = 0; i < 8; i++) - m_state[i] = DS2404_STATE_IDLE; + for (auto & elem : m_state) + elem = DS2404_STATE_IDLE; m_tick_timer = timer_alloc(0); m_tick_timer->adjust(attotime::from_hz(256), 0, attotime::from_hz(256)); @@ -353,10 +353,10 @@ void ds2404_device::device_timer(emu_timer &timer, device_timer_id id, int param case 0: { // tick - for(int i = 0; i < 5; i++) + for(auto & elem : m_rtc) { - m_rtc[ i ]++; - if(m_rtc[ i ] != 0) + elem++; + if(elem != 0) { break; } |