summaryrefslogtreecommitdiffstats
path: root/src/frontend/mame/ui/miscmenu.cpp
diff options
context:
space:
mode:
author Oliver Stöneberg <firewave@users.noreply.github.com>2020-01-23 04:03:35 +0100
committer R. Belmont <rb6502@users.noreply.github.com>2020-01-22 22:03:35 -0500
commit7c3aea8928f90955b7b67e40c705c16d8543384f (patch)
tree4818711117f20ef52fbbcec6543aa970c3c4d519 /src/frontend/mame/ui/miscmenu.cpp
parentd4bed5fce44ecf903e5170a8d4624a9edf7c14f3 (diff)
fixed some clang-tidy warnings (nw) (#6197)
* fixed some bugprone-throw-keyword-missing clang-tidy warnings (nw) * fixed some modernize-use-nullptr clang-tidy warnings (nw) * fixed some readability-delete-null-pointer clang-tidy warnings (nw) * fixed some performance-faster-string-find clang-tidy warnings (nw) * fixed some performance-for-range-copy clang-tidy warnings (nw) * fixed some readability-redundant-string-cstr clang-tidy warnings (nw)
Diffstat (limited to 'src/frontend/mame/ui/miscmenu.cpp')
-rw-r--r--src/frontend/mame/ui/miscmenu.cpp14
1 files changed, 7 insertions, 7 deletions
diff --git a/src/frontend/mame/ui/miscmenu.cpp b/src/frontend/mame/ui/miscmenu.cpp
index 4278e0efad9..55147b020ec 100644
--- a/src/frontend/mame/ui/miscmenu.cpp
+++ b/src/frontend/mame/ui/miscmenu.cpp
@@ -609,11 +609,11 @@ void menu_export::handle()
{
std::string filename("exported");
emu_file infile(ui().options().ui_path(), OPEN_FLAG_READ);
- if (infile.open(filename.c_str(), ".xml") == osd_file::error::NONE)
+ if (infile.open(filename, ".xml") == osd_file::error::NONE)
for (int seq = 0; ; ++seq)
{
std::string seqtext = string_format("%s_%04d", filename, seq);
- if (infile.open(seqtext.c_str(), ".xml") != osd_file::error::NONE)
+ if (infile.open(seqtext, ".xml") != osd_file::error::NONE)
{
filename = seqtext;
break;
@@ -622,7 +622,7 @@ void menu_export::handle()
// attempt to open the output file
emu_file file(ui().options().ui_path(), OPEN_FLAG_WRITE | OPEN_FLAG_CREATE | OPEN_FLAG_CREATE_PATHS);
- if (file.open(filename.c_str(), ".xml") == osd_file::error::NONE)
+ if (file.open(filename, ".xml") == osd_file::error::NONE)
{
std::string fullpath(file.fullpath());
file.close();
@@ -654,11 +654,11 @@ void menu_export::handle()
{
std::string filename("exported");
emu_file infile(ui().options().ui_path(), OPEN_FLAG_READ);
- if (infile.open(filename.c_str(), ".txt") == osd_file::error::NONE)
+ if (infile.open(filename, ".txt") == osd_file::error::NONE)
for (int seq = 0; ; ++seq)
{
std::string seqtext = string_format("%s_%04d", filename, seq);
- if (infile.open(seqtext.c_str(), ".txt") != osd_file::error::NONE)
+ if (infile.open(seqtext, ".txt") != osd_file::error::NONE)
{
filename = seqtext;
break;
@@ -667,7 +667,7 @@ void menu_export::handle()
// attempt to open the output file
emu_file file(ui().options().ui_path(), OPEN_FLAG_WRITE | OPEN_FLAG_CREATE | OPEN_FLAG_CREATE_PATHS);
- if (file.open(filename.c_str(), ".txt") == osd_file::error::NONE)
+ if (file.open(filename, ".txt") == osd_file::error::NONE)
{
// print the header
std::ostringstream buffer;
@@ -764,7 +764,7 @@ void menu_machine_configure::handle()
{
std::string filename(m_drv.name);
emu_file file(machine().options().ini_path(), OPEN_FLAG_WRITE | OPEN_FLAG_CREATE);
- osd_file::error filerr = file.open(filename.c_str(), ".ini");
+ osd_file::error filerr = file.open(filename, ".ini");
if (filerr == osd_file::error::NONE)
{
std::string inistring = m_opts.output_ini();