From 91921618c2e06bd0ed073b8efccd31a127c9012d Mon Sep 17 00:00:00 2001 From: AJR Date: Wed, 20 Jan 2021 17:46:03 -0500 Subject: Much more core std::string_view modernization - Remove corestr.h from emu.h; update a few source files to not use it at all - Change strtrimspace, strtrimrightspace and core_filename_extract_* to be pure functions taking a std::string_view by value and returning the same type - Change strmakeupper and strmakelower to be pure functions taking a std::string_view and constructing a std::string - Remove the string-modifying version of zippath_parent - Change tag-based lookup functions in device_t to take std::string_view instead of const std::string & or const char * - Remove the subdevice tag cache from device_t (since device finders are now recommended) and replace it with a map covering directly owned subdevices only - Move the working directory setup method out of device_image_interface (only the UI seems to actually use the full version of this) - Change output_manager to use std::string_view for output name arguments - Change core_options to accept std::string_view for most name and value arguments (return values are still C strings for now) - Change miscellaneous other functions to accept std::string_view arguments - Remove a few string accessor macros from romload.h - Remove many unnecessary c_str() calls from logging/error messages --- src/emu/debug/debugcmd.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'src/emu/debug/debugcmd.cpp') diff --git a/src/emu/debug/debugcmd.cpp b/src/emu/debug/debugcmd.cpp index 7e820bafa84..65a0218eddb 100644 --- a/src/emu/debug/debugcmd.cpp +++ b/src/emu/debug/debugcmd.cpp @@ -21,6 +21,7 @@ #include "points.h" #include "natkeyboard.h" #include "render.h" +#include "corestr.h" #include #include #include @@ -3670,7 +3671,7 @@ void debugger_commands::execute_snap(int ref, const std::vector &pa if (fname.find(".png") == -1) fname.append(".png"); emu_file file(m_machine.options().snapshot_directory(), OPEN_FLAG_WRITE | OPEN_FLAG_CREATE | OPEN_FLAG_CREATE_PATHS); - osd_file::error filerr = file.open(fname); + osd_file::error filerr = file.open(std::move(fname)); if (filerr != osd_file::error::NONE) { -- cgit v1.2.3