summaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
author Nathan Woods <npwoods@mess.org>2016-06-30 07:45:57 -0400
committer Nathan Woods <npwoods@mess.org>2016-06-30 07:45:57 -0400
commit37e0253f51300a333c9e0596d5a0fa4fed94af9c (patch)
treea71b72f8a36dfa488f97f3f3c7c2e4a0a71f6d64
parent4e5a47dc8cb05837ad06a4f474a8c0a124b6b890 (diff)
Reduced usage of c_str() when used with menu::item_append()
-rw-r--r--src/frontend/mame/ui/barcode.cpp2
-rw-r--r--src/frontend/mame/ui/custmenu.cpp14
-rw-r--r--src/frontend/mame/ui/custui.cpp22
-rw-r--r--src/frontend/mame/ui/inputmap.cpp6
-rw-r--r--src/frontend/mame/ui/miscmenu.cpp2
-rw-r--r--src/frontend/mame/ui/optsmenu.cpp10
-rw-r--r--src/frontend/mame/ui/pluginopt.cpp2
-rw-r--r--src/frontend/mame/ui/selector.cpp4
-rw-r--r--src/frontend/mame/ui/selgame.cpp2
-rw-r--r--src/frontend/mame/ui/selsoft.cpp6
-rw-r--r--src/frontend/mame/ui/sliders.cpp4
-rw-r--r--src/frontend/mame/ui/slotopt.cpp2
-rw-r--r--src/frontend/mame/ui/sndmenu.cpp2
-rw-r--r--src/frontend/mame/ui/swlist.cpp2
-rw-r--r--src/frontend/mame/ui/tapectrl.cpp2
-rw-r--r--src/frontend/mame/ui/videoopt.cpp2
16 files changed, 42 insertions, 42 deletions
diff --git a/src/frontend/mame/ui/barcode.cpp b/src/frontend/mame/ui/barcode.cpp
index 48c3ed52b2e..bd31e625a5a 100644
--- a/src/frontend/mame/ui/barcode.cpp
+++ b/src/frontend/mame/ui/barcode.cpp
@@ -57,7 +57,7 @@ void menu_barcode_reader::populate()
const char *new_barcode;
// selected device
- item_append(current_display_name().c_str(), "", current_display_flags(), ITEMREF_SELECT_READER);
+ item_append(current_display_name(), "", current_display_flags(), ITEMREF_SELECT_READER);
// append the "New Barcode" item
if (get_selection() == ITEMREF_NEW_BARCODE)
diff --git a/src/frontend/mame/ui/custmenu.cpp b/src/frontend/mame/ui/custmenu.cpp
index 33e940a21b5..ed2db5fcd96 100644
--- a/src/frontend/mame/ui/custmenu.cpp
+++ b/src/frontend/mame/ui/custmenu.cpp
@@ -176,7 +176,7 @@ void menu_custom_filter::populate()
arrow_flags = get_arrow_flags(0, c_mnfct::ui.size() - 1, custfltr::mnfct[x]);
std::string fbuff(_("^!Manufacturer"));
convert_command_glyph(fbuff);
- item_append(fbuff.c_str(), c_mnfct::ui[custfltr::mnfct[x]].c_str(), arrow_flags, (void *)(FPTR)(MNFCT_FILTER + x));
+ item_append(fbuff, c_mnfct::ui[custfltr::mnfct[x]], arrow_flags, (void *)(FPTR)(MNFCT_FILTER + x));
}
// add year subitem
@@ -185,7 +185,7 @@ void menu_custom_filter::populate()
arrow_flags = get_arrow_flags(0, c_year::ui.size() - 1, custfltr::year[x]);
std::string fbuff(_("^!Year"));
convert_command_glyph(fbuff);
- item_append(fbuff.c_str(), c_year::ui[custfltr::year[x]].c_str(), arrow_flags, (void *)(FPTR)(YEAR_FILTER + x));
+ item_append(fbuff, c_year::ui[custfltr::year[x]], arrow_flags, (void *)(FPTR)(YEAR_FILTER + x));
}
}
@@ -463,7 +463,7 @@ void menu_swcustom_filter::populate()
arrow_flags = get_arrow_flags(0, m_filter.publisher.ui.size() - 1, sw_custfltr::mnfct[x]);
std::string fbuff(_("^!Publisher"));
convert_command_glyph(fbuff);
- item_append(fbuff.c_str(), m_filter.publisher.ui[sw_custfltr::mnfct[x]].c_str(), arrow_flags, (void *)(FPTR)(MNFCT_FILTER + x));
+ item_append(fbuff, m_filter.publisher.ui[sw_custfltr::mnfct[x]], arrow_flags, (void *)(FPTR)(MNFCT_FILTER + x));
}
// add year subitem
@@ -472,7 +472,7 @@ void menu_swcustom_filter::populate()
arrow_flags = get_arrow_flags(0, m_filter.year.ui.size() - 1, sw_custfltr::year[x]);
std::string fbuff(_("^!Year"));
convert_command_glyph(fbuff);
- item_append(fbuff.c_str(), m_filter.year.ui[sw_custfltr::year[x]].c_str(), arrow_flags, (void *)(FPTR)(YEAR_FILTER + x));
+ item_append(fbuff, m_filter.year.ui[sw_custfltr::year[x]], arrow_flags, (void *)(FPTR)(YEAR_FILTER + x));
}
// add year subitem
@@ -481,7 +481,7 @@ void menu_swcustom_filter::populate()
arrow_flags = get_arrow_flags(0, m_filter.swlist.name.size() - 1, sw_custfltr::list[x]);
std::string fbuff(_("^!Software List"));
convert_command_glyph(fbuff);
- item_append(fbuff.c_str(), m_filter.swlist.description[sw_custfltr::list[x]].c_str(), arrow_flags, (void *)(FPTR)(LIST_FILTER + x));
+ item_append(fbuff, m_filter.swlist.description[sw_custfltr::list[x]], arrow_flags, (void *)(FPTR)(LIST_FILTER + x));
}
// add device type subitem
@@ -490,7 +490,7 @@ void menu_swcustom_filter::populate()
arrow_flags = get_arrow_flags(0, m_filter.type.ui.size() - 1, sw_custfltr::type[x]);
std::string fbuff(_("^!Device type"));
convert_command_glyph(fbuff);
- item_append(fbuff.c_str(), m_filter.type.ui[sw_custfltr::type[x]].c_str(), arrow_flags, (void *)(FPTR)(TYPE_FILTER + x));
+ item_append(fbuff, m_filter.type.ui[sw_custfltr::type[x]], arrow_flags, (void *)(FPTR)(TYPE_FILTER + x));
}
// add region subitem
@@ -499,7 +499,7 @@ void menu_swcustom_filter::populate()
arrow_flags = get_arrow_flags(0, m_filter.region.ui.size() - 1, sw_custfltr::region[x]);
std::string fbuff(_("^!Region"));
convert_command_glyph(fbuff);
- item_append(fbuff.c_str(), m_filter.region.ui[sw_custfltr::region[x]].c_str(), arrow_flags, (void *)(FPTR)(REGION_FILTER + x));
+ item_append(fbuff, m_filter.region.ui[sw_custfltr::region[x]], arrow_flags, (void *)(FPTR)(REGION_FILTER + x));
}
}
diff --git a/src/frontend/mame/ui/custui.cpp b/src/frontend/mame/ui/custui.cpp
index 77ae3388959..6eb4352e0c5 100644
--- a/src/frontend/mame/ui/custui.cpp
+++ b/src/frontend/mame/ui/custui.cpp
@@ -345,7 +345,7 @@ void menu_font_ui::populate()
// add fonts option
arrow_flags = get_arrow_flags(0, m_fonts.size() - 1, m_actual);
- item_append(_("UI Font"), m_fonts[m_actual].second.c_str(), arrow_flags, (void *)(FPTR)MUI_FNT);
+ item_append(_("UI Font"), m_fonts[m_actual].second, arrow_flags, (void *)(FPTR)MUI_FNT);
#ifdef UI_WINDOWS
if (m_fonts[m_actual].first != "default")
@@ -356,13 +356,13 @@ void menu_font_ui::populate()
#endif
arrow_flags = get_arrow_flags(m_font_min, m_font_max, m_font_size);
- item_append(_("Lines"), string_format("%2d", m_font_size).c_str(), arrow_flags, (void *)(FPTR)FONT_SIZE);
+ item_append(_("Lines"), string_format("%2d", m_font_size), arrow_flags, (void *)(FPTR)FONT_SIZE);
item_append(menu_item_type::SEPARATOR);
// add item
arrow_flags = get_arrow_flags(m_info_min, m_info_max, m_info_size);
- item_append(_("Infos text size"), string_format("%3.2f", m_info_size).c_str(), arrow_flags, (void *)(FPTR)INFOS_SIZE);
+ item_append(_("Infos text size"), string_format("%3.2f", m_info_size), arrow_flags, (void *)(FPTR)INFOS_SIZE);
item_append(menu_item_type::SEPARATOR);
@@ -833,34 +833,34 @@ void menu_rgb_ui::populate()
if (m_lock_ref != RGB_ALPHA)
{
arrow_flags = get_arrow_flags(0, 255, m_color->a());
- item_append(_("Alpha"), string_format("%3u", m_color->a()).c_str(), arrow_flags, (void *)(FPTR)RGB_ALPHA);
+ item_append(_("Alpha"), string_format("%3u", m_color->a()), arrow_flags, (void *)(FPTR)RGB_ALPHA);
}
else
- item_append(_("Alpha"), s_text.c_str(), 0, (void *)(FPTR)RGB_ALPHA);
+ item_append(_("Alpha"), s_text, 0, (void *)(FPTR)RGB_ALPHA);
if (m_lock_ref != RGB_RED)
{
arrow_flags = get_arrow_flags(0, 255, m_color->r());
- item_append(_("Red"), string_format("%3u", m_color->r()).c_str(), arrow_flags, (void *)(FPTR)RGB_RED);
+ item_append(_("Red"), string_format("%3u", m_color->r()), arrow_flags, (void *)(FPTR)RGB_RED);
}
else
- item_append(_("Red"), s_text.c_str(), 0, (void *)(FPTR)RGB_RED);
+ item_append(_("Red"), s_text, 0, (void *)(FPTR)RGB_RED);
if (m_lock_ref != RGB_GREEN)
{
arrow_flags = get_arrow_flags(0, 255, m_color->g());
- item_append(_("Green"), string_format("%3u", m_color->g()).c_str(), arrow_flags, (void *)(FPTR)RGB_GREEN);
+ item_append(_("Green"), string_format("%3u", m_color->g()), arrow_flags, (void *)(FPTR)RGB_GREEN);
}
else
- item_append(_("Green"), s_text.c_str(), 0, (void *)(FPTR)RGB_GREEN);
+ item_append(_("Green"), s_text, 0, (void *)(FPTR)RGB_GREEN);
if (m_lock_ref != RGB_BLUE)
{
arrow_flags = get_arrow_flags(0, 255, m_color->b());
- item_append(_("Blue"), string_format("%3u", m_color->b()).c_str(), arrow_flags, (void *)(FPTR)RGB_BLUE);
+ item_append(_("Blue"), string_format("%3u", m_color->b()), arrow_flags, (void *)(FPTR)RGB_BLUE);
}
else
- item_append(_("Blue"), s_text.c_str(), 0, (void *)(FPTR)RGB_BLUE);
+ item_append(_("Blue"), s_text, 0, (void *)(FPTR)RGB_BLUE);
item_append(menu_item_type::SEPARATOR);
item_append(_("Choose from palette"), "", 0, (void *)(FPTR)PALETTE_CHOOSE);
diff --git a/src/frontend/mame/ui/inputmap.cpp b/src/frontend/mame/ui/inputmap.cpp
index bf883b6cfa8..224b37c7944 100644
--- a/src/frontend/mame/ui/inputmap.cpp
+++ b/src/frontend/mame/ui/inputmap.cpp
@@ -810,8 +810,6 @@ menu_analog::menu_analog(mame_ui_manager &mui, render_container *container) : me
void menu_analog::populate()
{
- std::string text;
- std::string subtext;
std::string prev_owner;
bool first_entry = true;
@@ -856,6 +854,8 @@ void menu_analog::populate()
{
analog_item_data *data;
UINT32 flags = 0;
+ std::string text;
+ std::string subtext;
if (strcmp(field.device().tag(), prev_owner.c_str()) != 0)
{
if (first_entry)
@@ -919,7 +919,7 @@ void menu_analog::populate()
flags |= FLAG_RIGHT_ARROW;
/* append a menu item */
- item_append(text.c_str(), subtext.c_str(), flags, data);
+ item_append(std::move(text), std::move(subtext), flags, data);
}
}
}
diff --git a/src/frontend/mame/ui/miscmenu.cpp b/src/frontend/mame/ui/miscmenu.cpp
index 75458399e75..cbaeafc258a 100644
--- a/src/frontend/mame/ui/miscmenu.cpp
+++ b/src/frontend/mame/ui/miscmenu.cpp
@@ -775,7 +775,7 @@ void menu_machine_configure::populate()
if (!m_bios.empty())
{
UINT32 arrows = get_arrow_flags(0, m_bios.size() - 1, m_curbios);
- item_append(_("Driver"), m_bios[m_curbios].first.c_str(), arrows, (void *)(FPTR)BIOS);
+ item_append(_("Driver"), m_bios[m_curbios].first, arrows, (void *)(FPTR)BIOS);
}
else
item_append(_("This machine has no bios."), "", FLAG_DISABLE, nullptr);
diff --git a/src/frontend/mame/ui/optsmenu.cpp b/src/frontend/mame/ui/optsmenu.cpp
index 53af02c2363..5762ec9af9f 100644
--- a/src/frontend/mame/ui/optsmenu.cpp
+++ b/src/frontend/mame/ui/optsmenu.cpp
@@ -239,12 +239,12 @@ void menu_game_options::populate()
arrow_flags = get_arrow_flags(0, inif.total() - 1, inif.cur_file());
fbuff = _(" ^!File");
convert_command_glyph(fbuff);
- item_append(fbuff.c_str(), inif.get_file().c_str(), arrow_flags, (void *)(FPTR)FILE_CATEGORY_FILTER);
+ item_append(fbuff, inif.get_file(), arrow_flags, (void *)(FPTR)FILE_CATEGORY_FILTER);
arrow_flags = get_arrow_flags(0, inif.cat_total() - 1, inif.cur_cat());
fbuff = _(" ^!Category");
convert_command_glyph(fbuff);
- item_append(fbuff.c_str(), inif.get_category().c_str(), arrow_flags, (void *)(FPTR)CATEGORY_FILTER);
+ item_append(fbuff, inif.get_category(), arrow_flags, (void *)(FPTR)CATEGORY_FILTER);
}
// add manufacturer subitem
else if (m_main == FILTER_MANUFACTURER && c_mnfct::ui.size() > 0)
@@ -252,7 +252,7 @@ void menu_game_options::populate()
arrow_flags = get_arrow_flags(0, c_mnfct::ui.size() - 1, c_mnfct::actual);
fbuff = _("^!Manufacturer");
convert_command_glyph(fbuff);
- item_append(fbuff.c_str(), c_mnfct::ui[c_mnfct::actual].c_str(), arrow_flags, (void *)(FPTR)MANUFACT_CAT_FILTER);
+ item_append(fbuff, c_mnfct::ui[c_mnfct::actual], arrow_flags, (void *)(FPTR)MANUFACT_CAT_FILTER);
}
// add year subitem
else if (m_main == FILTER_YEAR && c_year::ui.size() > 0)
@@ -260,14 +260,14 @@ void menu_game_options::populate()
arrow_flags = get_arrow_flags(0, c_year::ui.size() - 1, c_year::actual);
fbuff.assign(_("^!Year"));
convert_command_glyph(fbuff);
- item_append(fbuff.c_str(), c_year::ui[c_year::actual].c_str(), arrow_flags, (void *)(FPTR)YEAR_CAT_FILTER);
+ item_append(fbuff, c_year::ui[c_year::actual], arrow_flags, (void *)(FPTR)YEAR_CAT_FILTER);
}
// add custom subitem
else if (m_main == FILTER_CUSTOM)
{
fbuff = _("^!Setup custom filter");
convert_command_glyph(fbuff);
- item_append(fbuff.c_str(), "", 0, (void *)(FPTR)CUSTOM_FILTER);
+ item_append(fbuff, "", 0, (void *)(FPTR)CUSTOM_FILTER);
}
item_append(menu_item_type::SEPARATOR);
diff --git a/src/frontend/mame/ui/pluginopt.cpp b/src/frontend/mame/ui/pluginopt.cpp
index c650fc78a91..c55a25468ba 100644
--- a/src/frontend/mame/ui/pluginopt.cpp
+++ b/src/frontend/mame/ui/pluginopt.cpp
@@ -106,7 +106,7 @@ void menu_plugin_opt::populate()
else if(item.flags == "lr")
flags = FLAG_RIGHT_ARROW | FLAG_LEFT_ARROW;
- item_append(item.text.c_str(), item.subtext.c_str(), flags, (void *)i++);
+ item_append(item.text, item.subtext, flags, (void *)i++);
}
item_append(menu_item_type::SEPARATOR);
}
diff --git a/src/frontend/mame/ui/selector.cpp b/src/frontend/mame/ui/selector.cpp
index aeea3aeae17..f5f07c0c2b3 100644
--- a/src/frontend/mame/ui/selector.cpp
+++ b/src/frontend/mame/ui/selector.cpp
@@ -137,7 +137,7 @@ void menu_selector::populate()
find_matches(m_search);
for (int curitem = 0; m_searchlist[curitem]; ++curitem)
- item_append(m_searchlist[curitem]->c_str(), "", 0, (void *)m_searchlist[curitem]);
+ item_append(*m_searchlist[curitem], "", 0, (void *)m_searchlist[curitem]);
}
else
{
@@ -148,7 +148,7 @@ void menu_selector::populate()
selected = added;
added++;
- item_append(m_str_items[index].c_str(), "", 0, (void *)&m_str_items[index]);
+ item_append(m_str_items[index], "", 0, (void *)&m_str_items[index]);
}
}
diff --git a/src/frontend/mame/ui/selgame.cpp b/src/frontend/mame/ui/selgame.cpp
index 4884c8f94eb..0368d9cbbaf 100644
--- a/src/frontend/mame/ui/selgame.cpp
+++ b/src/frontend/mame/ui/selgame.cpp
@@ -587,7 +587,7 @@ void menu_select_game::populate()
{
if (old_item_selected == -1 && mfavorite.shortname == reselect_last::driver)
old_item_selected = curitem;
- item_append(mfavorite.longname.c_str(), mfavorite.devicetype.c_str(),
+ item_append(mfavorite.longname, mfavorite.devicetype,
mfavorite.parentname.empty() ? flags_ui : (FLAG_INVERT | flags_ui), (void *)&mfavorite);
}
curitem++;
diff --git a/src/frontend/mame/ui/selsoft.cpp b/src/frontend/mame/ui/selsoft.cpp
index 3426166af02..c1be3b66e9d 100644
--- a/src/frontend/mame/ui/selsoft.cpp
+++ b/src/frontend/mame/ui/selsoft.cpp
@@ -477,7 +477,7 @@ void menu_select_software::populate()
else if (m_displaylist[curitem]->shortname == reselect_last::software && m_displaylist[curitem]->listname == reselect_last::swlist)
old_software = m_has_empty_start ? curitem + 1 : curitem;
- item_append(m_displaylist[curitem]->longname.c_str(), m_displaylist[curitem]->devicetype.c_str(),
+ item_append(m_displaylist[curitem]->longname, m_displaylist[curitem]->devicetype,
m_displaylist[curitem]->parentname.empty() ? flags_ui : (FLAG_INVERT | flags_ui), (void *)m_displaylist[curitem]);
}
}
@@ -487,7 +487,7 @@ void menu_select_software::populate()
find_matches(m_search, VISIBLE_GAMES_IN_SEARCH);
for (int curitem = 0; m_searchlist[curitem] != nullptr; ++curitem)
- item_append(m_searchlist[curitem]->longname.c_str(), m_searchlist[curitem]->devicetype.c_str(),
+ item_append(m_searchlist[curitem]->longname, m_searchlist[curitem]->devicetype,
m_searchlist[curitem]->parentname.empty() ? flags_ui : (FLAG_INVERT | flags_ui),
(void *)m_searchlist[curitem]);
}
@@ -1938,7 +1938,7 @@ software_parts::~software_parts()
void software_parts::populate()
{
for (auto & elem : m_parts)
- item_append(elem.first.c_str(), elem.second.c_str(), 0, (void *)&elem);
+ item_append(elem.first, elem.second, 0, (void *)&elem);
item_append(menu_item_type::SEPARATOR);
customtop = ui().get_line_height() + (3.0f * UI_BOX_TB_BORDER);
diff --git a/src/frontend/mame/ui/sliders.cpp b/src/frontend/mame/ui/sliders.cpp
index f8854b0aaca..8d4143259e8 100644
--- a/src/frontend/mame/ui/sliders.cpp
+++ b/src/frontend/mame/ui/sliders.cpp
@@ -152,7 +152,7 @@ void menu_sliders::populate()
flags |= FLAG_LEFT_ARROW;
if (curval < slider->maxval)
flags |= FLAG_RIGHT_ARROW;
- item_append(slider->description, tempstring.c_str(), flags, (void *)slider, menu_item_type::SLIDER);
+ item_append(slider->description, tempstring, flags, (void *)slider, menu_item_type::SLIDER);
}
else
{
@@ -175,7 +175,7 @@ void menu_sliders::populate()
flags |= FLAG_LEFT_ARROW;
if (curval < slider->maxval)
flags |= FLAG_RIGHT_ARROW;
- item_append(slider->description, tempstring.c_str(), flags, (void *)slider, menu_item_type::SLIDER);
+ item_append(slider->description, tempstring, flags, (void *)slider, menu_item_type::SLIDER);
}
else
{
diff --git a/src/frontend/mame/ui/slotopt.cpp b/src/frontend/mame/ui/slotopt.cpp
index c23346ef493..d6b1a438c30 100644
--- a/src/frontend/mame/ui/slotopt.cpp
+++ b/src/frontend/mame/ui/slotopt.cpp
@@ -168,7 +168,7 @@ void menu_slot_devices::populate()
opt_name.append(_(" [internal]"));
}
- item_append(slot.device().tag() + 1, opt_name.c_str(), (slot.fixed() || slot_get_length(slot) == 0) ? 0 : (FLAG_LEFT_ARROW | FLAG_RIGHT_ARROW), (void *)&slot);
+ item_append(slot.device().tag() + 1, opt_name, (slot.fixed() || slot_get_length(slot) == 0) ? 0 : (FLAG_LEFT_ARROW | FLAG_RIGHT_ARROW), (void *)&slot);
}
item_append(menu_item_type::SEPARATOR);
item_append(_("Reset"), "", 0, (void *)1);
diff --git a/src/frontend/mame/ui/sndmenu.cpp b/src/frontend/mame/ui/sndmenu.cpp
index a4f32222aa6..55e62062512 100644
--- a/src/frontend/mame/ui/sndmenu.cpp
+++ b/src/frontend/mame/ui/sndmenu.cpp
@@ -131,7 +131,7 @@ void menu_sound_options::populate()
// add options items
item_append(_("Sound"), m_sound ? _("On") : _("Off"), m_sound ? FLAG_RIGHT_ARROW : FLAG_LEFT_ARROW, (void *)(FPTR)ENABLE_SOUND);
- item_append(_("Sample Rate"), string_format("%d", m_sample_rate).c_str(), arrow_flags, (void *)(FPTR)SAMPLE_RATE);
+ item_append(_("Sample Rate"), string_format("%d", m_sample_rate), arrow_flags, (void *)(FPTR)SAMPLE_RATE);
item_append(_("Use External Samples"), m_samples ? _("On") : _("Off"), m_samples ? FLAG_RIGHT_ARROW : FLAG_LEFT_ARROW, (void *)(FPTR)ENABLE_SAMPLES);
item_append(menu_item_type::SEPARATOR);
diff --git a/src/frontend/mame/ui/swlist.cpp b/src/frontend/mame/ui/swlist.cpp
index be1f817abc0..bc554469a25 100644
--- a/src/frontend/mame/ui/swlist.cpp
+++ b/src/frontend/mame/ui/swlist.cpp
@@ -90,7 +90,7 @@ void menu_software_parts::populate()
menu_part_name.append(" (").append(swpart.feature("part_id")).append(")");
entry->type = T_ENTRY;
entry->part = &swpart;
- item_append(m_info->shortname(), menu_part_name.c_str(), 0, entry);
+ item_append(m_info->shortname(), menu_part_name, 0, entry);
}
}
}
diff --git a/src/frontend/mame/ui/tapectrl.cpp b/src/frontend/mame/ui/tapectrl.cpp
index 44150b67467..afc5f9d6894 100644
--- a/src/frontend/mame/ui/tapectrl.cpp
+++ b/src/frontend/mame/ui/tapectrl.cpp
@@ -59,7 +59,7 @@ void menu_tape_control::populate()
if (current_device())
{
// name of tape
- item_append(current_display_name().c_str(), current_device()->exists() ? current_device()->filename() : "No Tape Image loaded", current_display_flags(), TAPECMD_SELECT);
+ item_append(current_display_name(), current_device()->exists() ? current_device()->filename() : "No Tape Image loaded", current_display_flags(), TAPECMD_SELECT);
if (current_device()->exists())
{
diff --git a/src/frontend/mame/ui/videoopt.cpp b/src/frontend/mame/ui/videoopt.cpp
index ff605cadf32..cf558b46467 100644
--- a/src/frontend/mame/ui/videoopt.cpp
+++ b/src/frontend/mame/ui/videoopt.cpp
@@ -187,7 +187,7 @@ void menu_video_options::populate()
/* create a string for the item, replacing underscores with spaces */
tempstring.assign(name);
strreplace(tempstring, "_", " ");
- item_append(tempstring.c_str(), "", 0, (void *)(FPTR)(VIDEO_ITEM_VIEW + viewnum));
+ item_append(tempstring, "", 0, (void *)(FPTR)(VIDEO_ITEM_VIEW + viewnum));
}
/* add a separator */