summaryrefslogtreecommitdiffstats
path: root/src/frontend/mame/ui/filecreate.cpp
diff options
context:
space:
mode:
author npwoods <npwoods@mess.org>2022-04-11 06:54:35 -0400
committer GitHub <noreply@github.com>2022-04-11 06:54:35 -0400
commitb8758ed358e38adc40294ba39a410fe06f1b0c7c (patch)
tree329acfa0b3dc212383e243edd1aa621b823d86a0 /src/frontend/mame/ui/filecreate.cpp
parent9ef4774f2ee83df5ea6def9342450fad5061db23 (diff)
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.
Diffstat (limited to 'src/frontend/mame/ui/filecreate.cpp')
-rw-r--r--src/frontend/mame/ui/filecreate.cpp6
1 files changed, 3 insertions, 3 deletions
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<floppy_image_device::fs_info> &fs, int *result)
+menu_select_floppy_init::menu_select_floppy_init(mame_ui_manager &mui, render_container &container, std::vector<std::reference_wrapper<const floppy_image_device::fs_info>> &&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++));
}