summaryrefslogtreecommitdiffstats
path: root/src/frontend/mame/ui/sndmenu.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/frontend/mame/ui/sndmenu.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/frontend/mame/ui/sndmenu.cpp')
-rw-r--r--src/frontend/mame/ui/sndmenu.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/frontend/mame/ui/sndmenu.cpp b/src/frontend/mame/ui/sndmenu.cpp
index 01397bd8f74..a3c65e7f6c9 100644
--- a/src/frontend/mame/ui/sndmenu.cpp
+++ b/src/frontend/mame/ui/sndmenu.cpp
@@ -29,7 +29,7 @@ menu_sound_options::menu_sound_options(mame_ui_manager &mui, render_container &c
m_sound = (strcmp(options.sound(), OSDOPTVAL_NONE) && strcmp(options.sound(), "0"));
m_samples = mui.machine().options().samples();
- int total = ARRAY_LENGTH(m_sound_rate);
+ int total = std::size(m_sound_rate);
for (m_cur_rates = 0; m_cur_rates < total; m_cur_rates++)
if (m_sample_rate == m_sound_rate[m_cur_rates])
@@ -92,7 +92,7 @@ void menu_sound_options::handle()
}
else if (menu_event->iptkey == IPT_UI_SELECT)
{
- int total = ARRAY_LENGTH(m_sound_rate);
+ int total = std::size(m_sound_rate);
std::vector<std::string> s_sel(total);
for (int index = 0; index < total; index++)
s_sel[index] = std::to_string(m_sound_rate[index]);
@@ -128,7 +128,7 @@ void menu_sound_options::handle()
void menu_sound_options::populate(float &customtop, float &custombottom)
{
- uint32_t arrow_flags = get_arrow_flags(uint16_t(0), uint16_t(ARRAY_LENGTH(m_sound_rate) - 1), m_cur_rates);
+ uint32_t arrow_flags = get_arrow_flags(uint16_t(0), uint16_t(std::size(m_sound_rate) - 1), m_cur_rates);
m_sample_rate = m_sound_rate[m_cur_rates];
// add options items