From aec01e740736db267e452f0ed5947649f79e3408 Mon Sep 17 00:00:00 2001 From: Vas Crabb Date: Sun, 28 Feb 2016 11:09:00 +1100 Subject: Replace strformat, strprintf and strcatprintf with type-safe steam_format and string_format Update MAME to use new function Instantiate ODR-used static constant members Make some of the UI code more localisable Remove use of retired functions in tools --- src/emu/ui/filemngr.cpp | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) (limited to 'src/emu/ui/filemngr.cpp') diff --git a/src/emu/ui/filemngr.cpp b/src/emu/ui/filemngr.cpp index cccc92888c4..d46199793ce 100644 --- a/src/emu/ui/filemngr.cpp +++ b/src/emu/ui/filemngr.cpp @@ -68,7 +68,7 @@ void ui_menu_file_manager::custom_render(void *selectedref, float top, float bot void ui_menu_file_manager::fill_image_line(device_image_interface *img, std::string &instance, std::string &filename) { // get the image type/id - strprintf(instance,"%s (%s)", img->instance_name(), img->brief_instance_name()); + instance = string_format("%s (%s)", img->instance_name(), img->brief_instance_name()); // get the base name if (img->basename() != nullptr) @@ -103,7 +103,7 @@ void ui_menu_file_manager::fill_image_line(device_image_interface *img, std::str void ui_menu_file_manager::populate() { - std::string buffer, tmp_inst, tmp_name; + std::string tmp_inst, tmp_name; bool first_entry = true; if (!m_warnings.empty()) @@ -140,8 +140,7 @@ void ui_menu_file_manager::populate() first_entry = false; else item_append(MENU_SEPARATOR_ITEM, nullptr, 0, nullptr); - strprintf(buffer, "[root%s]", dev->tag()); - item_append(buffer.c_str(), nullptr, 0, nullptr); + item_append(string_format("[root%s]", dev->tag()).c_str(), nullptr, 0, nullptr); tag_appended = true; } // finally, append the image interface to the menu -- cgit v1.2.3-70-g09d2