diff options
author | 2021-02-14 11:05:57 -0500 | |
---|---|---|
committer | 2021-02-14 11:05:57 -0500 | |
commit | bc0146c2038c46f789a246d5616afd7c425157f3 (patch) | |
tree | b4d39194034b4c6e56ccd4035d25636034be43ca /src/devices/cpu/sh/sh.cpp | |
parent | 91310bcdeb7ab0ff661738b212017bf836f4e8ad (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/sh/sh.cpp')
-rw-r--r-- | src/devices/cpu/sh/sh.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/devices/cpu/sh/sh.cpp b/src/devices/cpu/sh/sh.cpp index 03fecd135ac..4779871d597 100644 --- a/src/devices/cpu/sh/sh.cpp +++ b/src/devices/cpu/sh/sh.cpp @@ -2009,7 +2009,7 @@ void cfunc_printf_probe(void *param) { ((sh_common_execution *)param)->func_prin void sh_common_execution::sh2drc_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; @@ -2051,7 +2051,7 @@ void sh_common_execution::alloc_handle(uml::code_handle *&handleptr, const char void sh_common_execution::load_fast_iregs(drcuml_block &block) { - for (int regnum = 0; regnum < ARRAY_LENGTH(m_regmap); regnum++) + for (int regnum = 0; regnum < std::size(m_regmap); regnum++) { if (m_regmap[regnum].is_int_register()) { @@ -2068,7 +2068,7 @@ void sh_common_execution::load_fast_iregs(drcuml_block &block) void sh_common_execution::save_fast_iregs(drcuml_block &block) { - for (int regnum = 0; regnum < ARRAY_LENGTH(m_regmap); regnum++) + for (int regnum = 0; regnum < std::size(m_regmap); regnum++) { if (m_regmap[regnum].is_int_register()) { @@ -4293,6 +4293,6 @@ void sh_common_execution::sh2drc_add_pcflush(offs_t address) { if (!allow_drc()) return; - if (m_pcfsel < ARRAY_LENGTH(m_pcflushes)) + if (m_pcfsel < std::size(m_pcflushes)) m_pcflushes[m_pcfsel++] = address; } |