summaryrefslogtreecommitdiffstats
path: root/src/frontend/mame/ui/submenu.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/submenu.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/submenu.cpp')
-rw-r--r--src/frontend/mame/ui/submenu.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/frontend/mame/ui/submenu.cpp b/src/frontend/mame/ui/submenu.cpp
index cb1d3e38089..c6e6cfbcd85 100644
--- a/src/frontend/mame/ui/submenu.cpp
+++ b/src/frontend/mame/ui/submenu.cpp
@@ -325,13 +325,13 @@ void submenu::populate(float &customtop, float &custombottom)
switch (sm_option->type)
{
case option_type::HEAD:
- item_append(_(sm_option->description), "", FLAG_DISABLE | FLAG_UI_HEADING, nullptr);
+ item_append(_(sm_option->description), FLAG_DISABLE | FLAG_UI_HEADING, nullptr);
break;
case option_type::SEP:
item_append(menu_item_type::SEPARATOR);
break;
case option_type::CMD:
- item_append(_(sm_option->description), "", 0, static_cast<void*>(&(*sm_option)));
+ item_append(_(sm_option->description), 0, static_cast<void*>(&(*sm_option)));
break;
case option_type::EMU:
case option_type::UI:
@@ -382,7 +382,7 @@ void submenu::populate(float &customtop, float &custombottom)
arrow_flags = get_arrow_flags(f_min, f_max, f_cur);
std::string tmptxt = string_format("%g", f_cur);
item_append(_(sm_option->description),
- tmptxt.c_str(),
+ tmptxt,
arrow_flags,
static_cast<void*>(&(*sm_option)));
}