From bc0146c2038c46f789a246d5616afd7c425157f3 Mon Sep 17 00:00:00 2001 From: AJR Date: Sun, 14 Feb 2021 11:05:57 -0500 Subject: 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 --- src/emu/natkeyboard.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/emu/natkeyboard.cpp') diff --git a/src/emu/natkeyboard.cpp b/src/emu/natkeyboard.cpp index e686e6385a8..e5dcdc93dbc 100644 --- a/src/emu/natkeyboard.cpp +++ b/src/emu/natkeyboard.cpp @@ -1066,7 +1066,7 @@ const char_info *char_info::find(char32_t target) { // perform a simple binary search to find the proper alternate int low = 0; - int high = ARRAY_LENGTH(charinfo); + int high = std::size(charinfo); while (high > low) { int middle = (high + low) / 2; @@ -1096,7 +1096,7 @@ bool validate_natural_keyboard_statics(void) const char_info *ci; // check to make sure that charinfo is in order - for (i = 0; i < ARRAY_LENGTH(charinfo); i++) + for (i = 0; i < std::size(charinfo); i++) { if (last_char >= charinfo[i].ch) { @@ -1107,7 +1107,7 @@ bool validate_natural_keyboard_statics(void) } // check to make sure that I can look up everything on alternate_charmap - for (i = 0; i < ARRAY_LENGTH(charinfo); i++) + for (i = 0; i < std::size(charinfo); i++) { ci = char_info::find(charinfo[i].ch); if (ci != &charinfo[i]) -- cgit v1.2.3-70-g09d2