diff options
author | 2021-01-01 12:18:29 -0500 | |
---|---|---|
committer | 2021-01-01 12:22:17 -0500 | |
commit | aa29519528cb3dbdbfac56819bea670ed8c56c5d (patch) | |
tree | bdaff6e127ed377a4fc84d3e8ee1b7a99f503d0b /src/frontend/mame/clifront.cpp | |
parent | 21fd9835451a5a7d7655964bfb7adb1ba9b8540f (diff) |
Further additions of std::string_view
- corefile.cpp, fileio.cpp: Change puts to take a std::string_view parameter
- rendlay.cpp: Use std::string_view instead of bare pointers in various functions
- vecstream.h: Add std::string_view conversion operator to obtain output buffer without needing to make it a C string with explicit null termination
- xmlfile.cpp: Add get_attribute_string_ptr method that distinguishes between empty strings and absent attributes without falling back to C strings
Diffstat (limited to 'src/frontend/mame/clifront.cpp')
-rw-r--r-- | src/frontend/mame/clifront.cpp | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/src/frontend/mame/clifront.cpp b/src/frontend/mame/clifront.cpp index c284fc879d5..cf5bd408151 100644 --- a/src/frontend/mame/clifront.cpp +++ b/src/frontend/mame/clifront.cpp @@ -1085,7 +1085,6 @@ const char cli_frontend::s_softlist_xml_dtd[] = void cli_frontend::output_single_softlist(std::ostream &out, software_list_device &swlistdev) { - util::stream_format(out, "\t<softwarelist name=\"%s\" description=\"%s\">\n", swlistdev.list_name(), util::xml::normalize_string(swlistdev.description().c_str())); for (const software_info &swinfo : swlistdev.get_info()) { util::stream_format(out, "\t\t<software name=\"%s\"", util::xml::normalize_string(swinfo.shortname().c_str())); @@ -1655,7 +1654,7 @@ void cli_frontend::execute_commands(const char *exename) throw emu_fatalerror("Unable to create file %s.ini\n",emulator_info::get_configname()); // generate the updated INI - file.puts(m_options.output_ini().c_str()); + file.puts(m_options.output_ini()); ui_options ui_opts; emu_file file_ui(OPEN_FLAG_WRITE | OPEN_FLAG_CREATE | OPEN_FLAG_CREATE_PATHS); @@ -1663,7 +1662,7 @@ void cli_frontend::execute_commands(const char *exename) throw emu_fatalerror("Unable to create file ui.ini\n"); // generate the updated INI - file_ui.puts(ui_opts.output_ini().c_str()); + file_ui.puts(ui_opts.output_ini()); plugin_options plugin_opts; path_iterator iter(m_options.plugins_path()); @@ -1678,7 +1677,7 @@ void cli_frontend::execute_commands(const char *exename) throw emu_fatalerror("Unable to create file plugin.ini\n"); // generate the updated INI - file_plugin.puts(plugin_opts.output_ini().c_str()); + file_plugin.puts(plugin_opts.output_ini()); return; } |