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/machine/68307tmu.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/machine/68307tmu.cpp')
-rw-r--r-- | src/devices/machine/68307tmu.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/devices/machine/68307tmu.cpp b/src/devices/machine/68307tmu.cpp index 02e98e78983..06d9f57234d 100644 --- a/src/devices/machine/68307tmu.cpp +++ b/src/devices/machine/68307tmu.cpp @@ -152,7 +152,7 @@ uint16_t m68307_cpu_device::m68307_timer::read_tcn(uint16_t mem_mask, int which) void m68307_cpu_device::m68307_timer::write_ter(uint16_t data, uint16_t mem_mask, int which) { - assert(which >= 0 && which < ARRAY_LENGTH(singletimer)); + assert(which >= 0 && which < std::size(singletimer)); single_timer* tptr = &singletimer[which]; if (data & 0x2) { @@ -167,7 +167,7 @@ void m68307_cpu_device::m68307_timer::write_ter(uint16_t data, uint16_t mem_mask void m68307_cpu_device::m68307_timer::write_tmr(uint16_t data, uint16_t mem_mask, int which) { m68307_cpu_device* m68k = parent; - assert(which >= 0 && which < ARRAY_LENGTH(singletimer)); + assert(which >= 0 && which < std::size(singletimer)); single_timer* tptr = &singletimer[which]; COMBINE_DATA(&tptr->regs[m68307TIMER_TMR]); @@ -216,7 +216,7 @@ void m68307_cpu_device::m68307_timer::write_tmr(uint16_t data, uint16_t mem_mask void m68307_cpu_device::m68307_timer::write_trr(uint16_t data, uint16_t mem_mask, int which) { - assert(which >= 0 && which < ARRAY_LENGTH(singletimer)); + assert(which >= 0 && which < std::size(singletimer)); single_timer* tptr = &singletimer[which]; COMBINE_DATA(&tptr->regs[m68307TIMER_TRR]); @@ -248,7 +248,7 @@ void m68307_cpu_device::m68307_timer::reset() bool m68307_cpu_device::m68307_timer::timer_int_pending(int which) const { - assert(which >= 0 && which < ARRAY_LENGTH(singletimer)); + assert(which >= 0 && which < std::size(singletimer)); const single_timer* tptr = &singletimer[which]; return BIT(tptr->regs[m68307TIMER_TER], 1) && BIT(tptr->regs[m68307TIMER_TMR], 4); |