summaryrefslogtreecommitdiffstats
path: root/src/devices/cpu/mips/mips3drc.cpp
diff options
context:
space:
mode:
author AJR <ajrhacker@users.noreply.github.com>2021-02-14 11:05:57 -0500
committer AJR <ajrhacker@users.noreply.github.com>2021-02-14 11:05:57 -0500
commitbc0146c2038c46f789a246d5616afd7c425157f3 (patch)
treeb4d39194034b4c6e56ccd4035d25636034be43ca /src/devices/cpu/mips/mips3drc.cpp
parent91310bcdeb7ab0ff661738b212017bf836f4e8ad (diff)
Eliminate ARRAY_LENGTH template in favor of C++17's std::size
* osdcomm.h: Move definition of EQUIVALENT_ARRAY to coretmpl.h * sharc.cpp, gt64xxx.cpp, ym2413.cpp, gb_lcd.cpp, snes_ppu.cpp: Use STRUCT_MEMBER for save state registration * gio/newport.cpp, megadrive/svp.cpp, nes_ctrl/bcbattle.cpp, arm7.cpp, tms9995.cpp, pckeybrd.cpp, sa1110.cpp, sa1111.cpp, jangou_blitter.cpp, vic4567.cpp: Use std::fill(_n) instead of memset * emucore.h: Remove obsolete typedef
Diffstat (limited to 'src/devices/cpu/mips/mips3drc.cpp')
-rw-r--r--src/devices/cpu/mips/mips3drc.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/devices/cpu/mips/mips3drc.cpp b/src/devices/cpu/mips/mips3drc.cpp
index 665f7b1a0b4..9b3396a09f9 100644
--- a/src/devices/cpu/mips/mips3drc.cpp
+++ b/src/devices/cpu/mips/mips3drc.cpp
@@ -120,7 +120,7 @@ inline void mips3_device::load_fast_iregs(drcuml_block &block)
{
int regnum;
- for (regnum = 0; regnum < ARRAY_LENGTH(m_regmap); regnum++)
+ for (regnum = 0; regnum < std::size(m_regmap); regnum++)
if (m_regmap[regnum].is_int_register())
UML_DMOV(block, ireg(m_regmap[regnum].ireg() - REG_I0), mem(&m_core->r[regnum]));
}
@@ -135,7 +135,7 @@ inline void mips3_device::save_fast_iregs(drcuml_block &block)
{
int regnum;
- for (regnum = 0; regnum < ARRAY_LENGTH(m_regmap); regnum++)
+ for (regnum = 0; regnum < std::size(m_regmap); regnum++)
if (m_regmap[regnum].is_int_register())
UML_DMOV(block, mem(&m_core->r[regnum]), ireg(m_regmap[regnum].ireg() - REG_I0));
}
@@ -174,7 +174,7 @@ void mips3_device::clear_fastram(uint32_t select_start)
void mips3_device::add_fastram(offs_t start, offs_t end, uint8_t readonly, void *base)
{
- if (m_fastram_select < ARRAY_LENGTH(m_fastram))
+ if (m_fastram_select < std::size(m_fastram))
{
m_fastram[m_fastram_select].start = start;
m_fastram[m_fastram_select].end = end;
@@ -197,7 +197,7 @@ void mips3_device::add_fastram(offs_t start, offs_t end, uint8_t readonly, void
void mips3_device::mips3drc_add_hotspot(offs_t pc, uint32_t opcode, uint32_t cycles)
{
if (!allow_drc()) return;
- if (m_hotspot_select < ARRAY_LENGTH(m_hotspot))
+ if (m_hotspot_select < std::size(m_hotspot))
{
m_hotspot[m_hotspot_select].pc = pc;
m_hotspot[m_hotspot_select].opcode = opcode;