diff options
Diffstat (limited to 'src/devices/bus/comx35/expbox.cpp')
-rw-r--r-- | src/devices/bus/comx35/expbox.cpp | 34 |
1 files changed, 17 insertions, 17 deletions
diff --git a/src/devices/bus/comx35/expbox.cpp b/src/devices/bus/comx35/expbox.cpp index 7e4e9799e29..ce0dec61006 100644 --- a/src/devices/bus/comx35/expbox.cpp +++ b/src/devices/bus/comx35/expbox.cpp @@ -149,9 +149,9 @@ void comx_eb_device::device_start() m_expansion_slot[2] = dynamic_cast<comx_expansion_slot_device *>(subdevice(SLOT3_TAG)); m_expansion_slot[3] = dynamic_cast<comx_expansion_slot_device *>(subdevice(SLOT4_TAG)); - for (int slot = 0; slot < MAX_EB_SLOTS; slot++) + for (auto & elem : m_irq) { - m_irq[slot] = CLEAR_LINE; + elem = CLEAR_LINE; } } @@ -162,12 +162,12 @@ void comx_eb_device::device_start() void comx_eb_device::device_reset() { - for (int slot = 0; slot < MAX_EB_SLOTS; slot++) + for (auto & elem : m_expansion_slot) { - if (m_expansion_slot[slot] != NULL) + if (elem != nullptr) { - m_expansion_slot[slot]->device().reset(); - m_expansion_slot[slot]->ds_w(0); + elem->device().reset(); + elem->ds_w(0); } } } @@ -181,11 +181,11 @@ int comx_eb_device::comx_ef4_r() { int state = CLEAR_LINE; - for (int slot = 0; slot < MAX_EB_SLOTS; slot++) + for (auto & elem : m_expansion_slot) { - if (m_expansion_slot[slot] != NULL) + if (elem != nullptr) { - state |= m_expansion_slot[slot]->ef4_r(); + state |= elem->ef4_r(); } } @@ -199,11 +199,11 @@ int comx_eb_device::comx_ef4_r() void comx_eb_device::comx_q_w(int state) { - for (int slot = 0; slot < MAX_EB_SLOTS; slot++) + for (auto & elem : m_expansion_slot) { - if (m_expansion_slot[slot] != NULL) + if (elem != nullptr) { - m_expansion_slot[slot]->q_w(state); + elem->q_w(state); } } } @@ -230,7 +230,7 @@ UINT8 comx_eb_device::comx_mrd_r(address_space &space, offs_t offset, int *extro { for (int slot = 0; slot < MAX_EB_SLOTS; slot++) { - if (BIT(m_select, slot) && m_expansion_slot[slot] != NULL) + if (BIT(m_select, slot) && m_expansion_slot[slot] != nullptr) { data |= m_expansion_slot[slot]->mrd_r(space, offset, extrom); } @@ -249,7 +249,7 @@ void comx_eb_device::comx_mwr_w(address_space &space, offs_t offset, UINT8 data) { for (int slot = 0; slot < MAX_EB_SLOTS; slot++) { - if (BIT(m_select, slot) && m_expansion_slot[slot] != NULL) + if (BIT(m_select, slot) && m_expansion_slot[slot] != nullptr) { m_expansion_slot[slot]->mwr_w(space, offset, data); } @@ -267,7 +267,7 @@ UINT8 comx_eb_device::comx_io_r(address_space &space, offs_t offset) for (int slot = 0; slot < MAX_EB_SLOTS; slot++) { - if (BIT(m_select, slot) && m_expansion_slot[slot] != NULL) + if (BIT(m_select, slot) && m_expansion_slot[slot] != nullptr) { data |= m_expansion_slot[slot]->io_r(space, offset); } @@ -289,7 +289,7 @@ void comx_eb_device::comx_io_w(address_space &space, offs_t offset, UINT8 data) for (int slot = 0; slot < MAX_EB_SLOTS; slot++) { - if (m_expansion_slot[slot] != NULL) + if (m_expansion_slot[slot] != nullptr) { m_expansion_slot[slot]->ds_w(BIT(m_select, slot)); } @@ -298,7 +298,7 @@ void comx_eb_device::comx_io_w(address_space &space, offs_t offset, UINT8 data) for (int slot = 0; slot < MAX_EB_SLOTS; slot++) { - if (BIT(m_select, slot) && m_expansion_slot[slot] != NULL) + if (BIT(m_select, slot) && m_expansion_slot[slot] != nullptr) { m_expansion_slot[slot]->io_w(space, offset, data); } |