diff options
Diffstat (limited to 'src/devices/machine/z80ctc.cpp')
-rw-r--r-- | src/devices/machine/z80ctc.cpp | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/devices/machine/z80ctc.cpp b/src/devices/machine/z80ctc.cpp index 7ea90146ca3..13c4844c9e3 100644 --- a/src/devices/machine/z80ctc.cpp +++ b/src/devices/machine/z80ctc.cpp @@ -183,9 +183,9 @@ int z80ctc_device::z80daisy_irq_state() // loop over all channels int state = 0; - for (int ch = 0; ch < 4; ch++) + for (auto & channel : m_channel) { - ctc_channel &channel = m_channel[ch]; + // if we're servicing a request, don't indicate more interrupts if (channel.m_int_state & Z80_DAISY_IEO) @@ -284,13 +284,13 @@ void z80ctc_device::interrupt_check() //------------------------------------------------- z80ctc_device::ctc_channel::ctc_channel() - : m_device(NULL), + : m_device(nullptr), m_index(0), m_mode(0), m_tconst(0), m_down(0), m_extclk(0), - m_timer(NULL), + m_timer(nullptr), m_int_state(0) { } @@ -369,7 +369,7 @@ UINT8 z80ctc_device::ctc_channel::read() VPRINTF_CHANNEL(("CTC clock %f\n",ATTOSECONDS_TO_HZ(period.attoseconds()))); - if (m_timer != NULL) + if (m_timer != nullptr) return ((int)(m_timer->remaining().as_double() / period.as_double()) + 1) & 0xff; else return 0; |