From b8758ed358e38adc40294ba39a410fe06f1b0c7c Mon Sep 17 00:00:00 2001 From: npwoods Date: Mon, 11 Apr 2022 06:54:35 -0400 Subject: Consolidated floppy_image_device::m_create_fs and floppy_image_device::m_io_fs vectors (#9542) * Consolidated floppy_image_device::m_create_fs and floppy_image_device::m_io_fs vectors We had two separate members in floppy_image_device (m_create_fs and m_io_fs) that contained the same data. Whether the file systems can be formatted or read can be identified by querying fs::manager_t. For this reason, it seems bad to have these separate members, the seemingly only reason to make the UI code slightly less complicated. For this reason I consolidated these two members and moved the burden of selecting which ones are creatable to the UI code. --- src/frontend/mame/ui/filecreate.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/frontend/mame/ui/filecreate.cpp') diff --git a/src/frontend/mame/ui/filecreate.cpp b/src/frontend/mame/ui/filecreate.cpp index 8e036f4ae3b..3ecb44f9b62 100644 --- a/src/frontend/mame/ui/filecreate.cpp +++ b/src/frontend/mame/ui/filecreate.cpp @@ -290,9 +290,9 @@ SELECT FORMAT MENU // ctor //------------------------------------------------- -menu_select_floppy_init::menu_select_floppy_init(mame_ui_manager &mui, render_container &container, const std::vector &fs, int *result) +menu_select_floppy_init::menu_select_floppy_init(mame_ui_manager &mui, render_container &container, std::vector> &&fs, int *result) : menu(mui, container), - m_fs(fs), + m_fs(std::move(fs)), m_result(result) { @@ -316,7 +316,7 @@ void menu_select_floppy_init::populate(float &customtop, float &custombottom) { item_append(_("Select initial contents"), FLAG_DISABLE, nullptr); int id = 0; - for (const auto &fmt : m_fs) + for (const floppy_image_device::fs_info &fmt : m_fs) item_append(fmt.m_description, fmt.m_name, 0, (void *)(uintptr_t)(id++)); } -- cgit v1.2.3-70-g09d2