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/ui/ui.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/ui/ui.cpp')
-rw-r--r-- | src/frontend/mame/ui/ui.cpp | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/src/frontend/mame/ui/ui.cpp b/src/frontend/mame/ui/ui.cpp index 64f68d92049..e2ea6745f86 100644 --- a/src/frontend/mame/ui/ui.cpp +++ b/src/frontend/mame/ui/ui.cpp @@ -2262,8 +2262,7 @@ void mame_ui_manager::save_ui_options() if (file.open("ui.ini") == osd_file::error::NONE) { // generate the updated INI - std::string initext = options().output_ini(); - file.puts(initext.c_str()); + file.puts(options().output_ini()); file.close(); } else @@ -2321,8 +2320,7 @@ void mame_ui_manager::save_main_option() if (file.open(std::string(emulator_info::get_configname()) + ".ini") == osd_file::error::NONE) { // generate the updated INI - std::string initext = options.output_ini(); - file.puts(initext.c_str()); + file.puts(options.output_ini()); file.close(); } else { |