diff options
author | npwoods <npwoods@alumni.carnegiemellon.edu> | 2017-03-04 16:00:18 -0500 |
---|---|---|
committer | ajrhacker <ajrhacker@users.noreply.github.com> | 2017-03-04 16:00:18 -0500 |
commit | a011e3a22ef667358e94d4a6deb6ad440b6b35f3 (patch) | |
tree | 48c7e4f6c926106f04e87299ec52cf406e0e778c /src/frontend | |
parent | 573853e3b6851d64a4324ba18e98e7afc58cead6 (diff) |
Changed a few more 'const char *' ==> 'const std::string &' (#2111)
Diffstat (limited to 'src/frontend')
-rw-r--r-- | src/frontend/mame/clifront.cpp | 2 | ||||
-rw-r--r-- | src/frontend/mame/info.cpp | 4 | ||||
-rw-r--r-- | src/frontend/mame/mameopts.cpp | 4 | ||||
-rw-r--r-- | src/frontend/mame/ui/inifile.cpp | 2 | ||||
-rw-r--r-- | src/frontend/mame/ui/selsoft.cpp | 2 |
5 files changed, 7 insertions, 7 deletions
diff --git a/src/frontend/mame/clifront.cpp b/src/frontend/mame/clifront.cpp index 007568260bd..f7e33954b2a 100644 --- a/src/frontend/mame/clifront.cpp +++ b/src/frontend/mame/clifront.cpp @@ -752,7 +752,7 @@ void cli_frontend::listmedia(const char *gamename) std::string paren_shortname = string_format("(%s)", imagedev.brief_instance_name()); // output the line, up to the list of extensions - printf("%-16s %-16s %-10s ", first ? drivlist.driver().name : "", imagedev.instance_name(), paren_shortname.c_str()); + printf("%-16s %-16s %-10s ", first ? drivlist.driver().name : "", imagedev.instance_name().c_str(), paren_shortname.c_str()); // get the extensions and print them std::string extensions(imagedev.file_extensions()); diff --git a/src/frontend/mame/info.cpp b/src/frontend/mame/info.cpp index 1593d8500d1..fa742dfe2f4 100644 --- a/src/frontend/mame/info.cpp +++ b/src/frontend/mame/info.cpp @@ -1482,8 +1482,8 @@ void info_xml_creator::output_images(device_t &device, const char *root_tag) if (loadable) { - const char *name = imagedev.instance_name(); - const char *shortname = imagedev.brief_instance_name(); + const char *name = imagedev.instance_name().c_str(); + const char *shortname = imagedev.brief_instance_name().c_str(); fprintf(m_output, "\t\t\t<instance"); fprintf(m_output, " name=\"%s\"", util::xml::normalize_string(name)); diff --git a/src/frontend/mame/mameopts.cpp b/src/frontend/mame/mameopts.cpp index 49a31d28f26..2e09aef38ab 100644 --- a/src/frontend/mame/mameopts.cpp +++ b/src/frontend/mame/mameopts.cpp @@ -129,11 +129,11 @@ void mame_options::add_device_options(emu_options &options, std::function<void(e // retrieve info about the device instance std::ostringstream option_name; util::stream_format(option_name, "%s;%s", image.instance_name(), image.brief_instance_name()); - if (strcmp(image.device_typename(image.image_type()), image.instance_name()) == 0) + if (strcmp(image.device_typename(image.image_type()), image.instance_name().c_str()) == 0) util::stream_format(option_name, ";%s1;%s1", image.instance_name(), image.brief_instance_name()); // add the option - if (!options.exists(image.instance_name())) + if (!options.exists(image.instance_name().c_str())) { // first device? add the header as to be pretty if (m_device_options++ == 0) diff --git a/src/frontend/mame/ui/inifile.cpp b/src/frontend/mame/ui/inifile.cpp index f89e614b30a..29dc08911c4 100644 --- a/src/frontend/mame/ui/inifile.cpp +++ b/src/frontend/mame/ui/inifile.cpp @@ -203,7 +203,7 @@ void favorite_manager::add_favorite_game() tmpmatches.driver = &machine().system(); tmpmatches.listname = strensure(image.software_list_name()); tmpmatches.interface = part->interface(); - tmpmatches.instance = strensure(image.instance_name()); + tmpmatches.instance = image.instance_name(); tmpmatches.startempty = 0; tmpmatches.parentlongname.clear(); if (!swinfo->parentname().empty()) diff --git a/src/frontend/mame/ui/selsoft.cpp b/src/frontend/mame/ui/selsoft.cpp index 17e7abc1a7e..b5eeb36b204 100644 --- a/src/frontend/mame/ui/selsoft.cpp +++ b/src/frontend/mame/ui/selsoft.cpp @@ -540,7 +540,7 @@ void menu_select_software::build_software_list() const char *interface = image.image_interface(); if (interface != nullptr && part.matches_interface(interface)) { - instance_name = image.instance_name(); + instance_name = image.instance_name().c_str(); if (instance_name != nullptr) tmpmatches.instance = image.instance_name(); |