summaryrefslogtreecommitdiffstatshomepage
path: root/src/frontend
diff options
context:
space:
mode:
authorGravatarGravatar npwoods <npwoods@mess.org>2019-08-01 08:39:56 -0400
committerGravatarGravatar npwoods <npwoods@mess.org>2019-08-01 09:23:39 -0400
commit6a15fe5d73d78753b49033cf5d3b069d2a05a1b7 (patch)
treee66dfe5dc414f5c016244a693866c80d699bcf38 /src/frontend
parent01cbf5a1eb16fd6f60ff7bbd6bc96db90066a309 (diff)
Enabled default move ctor/assignments in core_options, and changed
plugin_options code to use them
Diffstat (limited to 'src/frontend')
-rw-r--r--src/frontend/mame/pluginopts.cpp12
1 files changed, 7 insertions, 5 deletions
diff --git a/src/frontend/mame/pluginopts.cpp b/src/frontend/mame/pluginopts.cpp
index 82441fd3da3..5bbddaf1473 100644
--- a/src/frontend/mame/pluginopts.cpp
+++ b/src/frontend/mame/pluginopts.cpp
@@ -125,7 +125,7 @@ plugin *plugin_options::find(const std::string &name)
// create_core_options
//-------------------------------------------------
-static void create_core_options(core_options &opts, const plugin_options &plugin_opts)
+static core_options create_core_options(const plugin_options &plugin_opts)
{
// we're sort of abusing core_options to just get INI file parsing, so we'll build a
// core_options structure for the sole purpose of parsing an INI file, and then reflect
@@ -135,6 +135,8 @@ static void create_core_options(core_options &opts, const plugin_options &plugin
{ nullptr, nullptr, OPTION_HEADER, "PLUGINS OPTIONS" },
{ nullptr }
};
+
+ core_options opts;
opts.add_entries(s_option_entries);
// create an entry for each option
@@ -146,6 +148,8 @@ static void create_core_options(core_options &opts, const plugin_options &plugin
core_options::option_type::BOOLEAN,
p.m_start ? "1" : "0");
}
+
+ return opts;
}
@@ -155,8 +159,7 @@ static void create_core_options(core_options &opts, const plugin_options &plugin
void plugin_options::parse_ini_file(util::core_file &inifile)
{
- core_options opts;
- create_core_options(opts, *this);
+ core_options opts = create_core_options(*this);
// parse the INI file
opts.parse_ini_file(inifile, OPTION_PRIORITY_NORMAL, true, true);
@@ -173,7 +176,6 @@ void plugin_options::parse_ini_file(util::core_file &inifile)
std::string plugin_options::output_ini() const
{
- core_options opts;
- create_core_options(opts, *this);
+ core_options opts = create_core_options(*this);
return opts.output_ini();
}