summaryrefslogtreecommitdiffstats
path: root/src/devices/machine/eepromser.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/machine/eepromser.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/machine/eepromser.cpp')
-rw-r--r--src/devices/machine/eepromser.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/devices/machine/eepromser.cpp b/src/devices/machine/eepromser.cpp
index bd0447258f6..a8502e72fe3 100644
--- a/src/devices/machine/eepromser.cpp
+++ b/src/devices/machine/eepromser.cpp
@@ -331,7 +331,7 @@ void eeprom_serial_base_device::set_state(eeprom_state newstate)
{ STATE_WAIT_FOR_COMPLETION, "WAIT_FOR_COMPLETION" },
};
const char *newstate_string = "UNKNOWN";
- for (int index = 0; index < ARRAY_LENGTH(s_state_names); index++)
+ for (int index = 0; index < std::size(s_state_names); index++)
if (s_state_names[index].state == newstate)
newstate_string = s_state_names[index].string;
LOG2("New state: %s\n", newstate_string);
@@ -484,7 +484,7 @@ void eeprom_serial_base_device::execute_command()
{ COMMAND_ERASEALL, "Execute command:ERASEALL\n" },
};
const char *command_string = s_command_names[0].string;
- for (int index = 0; index < ARRAY_LENGTH(s_command_names); index++)
+ for (int index = 0; index < std::size(s_command_names); index++)
if (s_command_names[index].command == m_command)
command_string = s_command_names[index].string;
LOG1(command_string, m_address);
@@ -565,7 +565,7 @@ void eeprom_serial_base_device::execute_write_command()
{ COMMAND_WRITEALL, "Execute write command: WRITEALL (%X) = 0x%X\n" },
};
const char *command_string = "UNKNOWN";
- for (int index = 0; index < ARRAY_LENGTH(s_command_names); index++)
+ for (int index = 0; index < std::size(s_command_names); index++)
if (s_command_names[index].command == m_command)
command_string = s_command_names[index].string;
LOG1(command_string, m_address, m_shift_register);
@@ -807,7 +807,7 @@ void eeprom_serial_x24c44_device::execute_command()
{ COMMAND_COPY_RAM_TO_EEPROM, "Execute command:COPY_RAM_TO_EEPROM\n" },
};
const char *command_string = s_command_names[0].string;
- for (int index = 0; index < ARRAY_LENGTH(s_command_names); index++)
+ for (int index = 0; index < std::size(s_command_names); index++)
if (s_command_names[index].command == m_command)
command_string = s_command_names[index].string;
LOG1(command_string, m_address);