summaryrefslogtreecommitdiffstats
path: root/src/devices/cpu/powerpc/ppccom.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/devices/cpu/powerpc/ppccom.cpp')
-rw-r--r--src/devices/cpu/powerpc/ppccom.cpp12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/devices/cpu/powerpc/ppccom.cpp b/src/devices/cpu/powerpc/ppccom.cpp
index 566be7c820a..1ff153ca1b6 100644
--- a/src/devices/cpu/powerpc/ppccom.cpp
+++ b/src/devices/cpu/powerpc/ppccom.cpp
@@ -1919,7 +1919,7 @@ void ppc_device::ppccom_execute_mfdcr()
/* default handling */
if (m_dcr_read_func.isnull()) {
osd_printf_debug("DCR %03X read\n", m_core->param0);
- if (m_core->param0 < ARRAY_LENGTH(m_dcr))
+ if (m_core->param0 < std::size(m_dcr))
m_core->param1 = m_dcr[m_core->param0];
else
m_core->param1 = 0;
@@ -2011,7 +2011,7 @@ void ppc_device::ppccom_execute_mtdcr()
/* default handling */
if (m_dcr_write_func.isnull()) {
osd_printf_debug("DCR %03X write = %08X\n", m_core->param0, m_core->param1);
- if (m_core->param0 < ARRAY_LENGTH(m_dcr))
+ if (m_core->param0 < std::size(m_dcr))
m_dcr[m_core->param0] = m_core->param1;
} else {
m_dcr_write_func(m_core->param0,m_core->param1);
@@ -2662,7 +2662,7 @@ void ppc_device::ppc4xx_spu_rx_data(uint8_t data)
uint32_t new_rxin;
/* fail if we are going to overflow */
- new_rxin = (m_spu.rxin + 1) % ARRAY_LENGTH(m_spu.rxbuffer);
+ new_rxin = (m_spu.rxin + 1) % std::size(m_spu.rxbuffer);
if (new_rxin == m_spu.rxout)
fatalerror("ppc4xx_spu_rx_data: buffer overrun!\n");
@@ -2741,7 +2741,7 @@ TIMER_CALLBACK_MEMBER( ppc_device::ppc4xx_spu_callback )
/* consume the byte and advance the out pointer */
rxbyte = m_spu.rxbuffer[m_spu.rxout];
- m_spu.rxout = (m_spu.rxout + 1) % ARRAY_LENGTH(m_spu.rxbuffer);
+ m_spu.rxout = (m_spu.rxout + 1) % std::size(m_spu.rxbuffer);
/* if we're not full, copy data to the buffer and update the line status */
if (!(m_spu.regs[SPU4XX_LINE_STATUS] & 0x80))
@@ -2784,7 +2784,7 @@ uint8_t ppc4xx_device::ppc4xx_spu_r(offs_t offset)
break;
default:
- if (offset < ARRAY_LENGTH(m_spu.regs))
+ if (offset < std::size(m_spu.regs))
result = m_spu.regs[offset];
break;
}
@@ -2848,7 +2848,7 @@ void ppc4xx_device::ppc4xx_spu_w(offs_t offset, uint8_t data)
break;
default:
- if (offset < ARRAY_LENGTH(m_spu.regs))
+ if (offset < std::size(m_spu.regs))
m_spu.regs[offset] = data;
break;
}