summaryrefslogtreecommitdiffstats
path: root/src/frontend/mame/ui/filecreate.cpp
diff options
context:
space:
mode:
author AJR <ajrhacker@users.noreply.github.com>2020-12-08 21:19:17 -0500
committer AJR <ajrhacker@users.noreply.github.com>2020-12-08 21:24:46 -0500
commitc22cb17f326b4939d8ff4219410909e32e70ab86 (patch)
tree8db68c201fa9673eeb6acab37a5d221c7a338ea6 /src/frontend/mame/ui/filecreate.cpp
parent6172111b187c1dd66329adb2b9bba2a82a0ce116 (diff)
C++17 string handling updates (without charconv so as not to break GCC 7)
- render.cpp, rendlay.cpp, ui/ui.cpp, ui/menu.cpp: Change argument types for text processing functions from const char * to std::string_view - ui/menu.cpp: Add overloads of item_append omitting the frequently empty subtext argument - cheat.cpp: Remove some c_str() calls that became unnecessary a while ago
Diffstat (limited to 'src/frontend/mame/ui/filecreate.cpp')
-rw-r--r--src/frontend/mame/ui/filecreate.cpp14
1 files changed, 7 insertions, 7 deletions
diff --git a/src/frontend/mame/ui/filecreate.cpp b/src/frontend/mame/ui/filecreate.cpp
index 157b19bec9a..181c4a985ab 100644
--- a/src/frontend/mame/ui/filecreate.cpp
+++ b/src/frontend/mame/ui/filecreate.cpp
@@ -76,10 +76,10 @@ menu_confirm_save_as::~menu_confirm_save_as()
void menu_confirm_save_as::populate(float &customtop, float &custombottom)
{
- item_append(_("File Already Exists - Override?"), "", FLAG_DISABLE, nullptr);
+ item_append(_("File Already Exists - Override?"), FLAG_DISABLE, nullptr);
item_append(menu_item_type::SEPARATOR);
- item_append(_("No"), "", 0, ITEMREF_NO);
- item_append(_("Yes"), "", 0, ITEMREF_YES);
+ item_append(_("No"), 0, ITEMREF_NO);
+ item_append(_("Yes"), 0, ITEMREF_YES);
}
//-------------------------------------------------
@@ -143,8 +143,8 @@ menu_file_create::~menu_file_create()
void menu_file_create::custom_render(void *selectedref, float top, float bottom, float origx1, float origy1, float origx2, float origy2)
{
extra_text_render(top, bottom, origx1, origy1, origx2, origy2,
- m_current_directory.c_str(),
- nullptr);
+ m_current_directory,
+ std::string_view());
}
@@ -180,7 +180,7 @@ void menu_file_create::populate(float &customtop, float &custombottom)
// finish up the menu
item_append(menu_item_type::SEPARATOR);
- item_append(_("Create"), "", 0, ITEMREF_CREATE);
+ item_append(_("Create"), 0, ITEMREF_CREATE);
customtop = ui().get_line_height() + 3.0f * ui().box_tb_border();
}
@@ -263,7 +263,7 @@ menu_select_format::~menu_select_format()
void menu_select_format::populate(float &customtop, float &custombottom)
{
- item_append(_("Select image format"), "", FLAG_DISABLE, nullptr);
+ item_append(_("Select image format"), FLAG_DISABLE, nullptr);
for (int i = 0; i < m_total_usable; i++)
{
const floppy_image_format_t *fmt = m_formats[i];