summaryrefslogtreecommitdiffstatshomepage
path: root/src/frontend
diff options
context:
space:
mode:
author Vas Crabb <vas@vastheman.com>2018-01-26 19:26:51 +1100
committer Vas Crabb <vas@vastheman.com>2018-01-26 19:26:51 +1100
commit1ffe721b0f4af8ad3e076e9f6a8be38db0f6f8e9 (patch)
treef14d28d954654819776fb45d5fd6c3520fa14b04 /src/frontend
parentb63c459902a1f9b4a690a8ac21db5dc08cb516d1 (diff)
misc fix/cleanup (nw)
Diffstat (limited to 'src/frontend')
-rw-r--r--src/frontend/mame/pluginopts.cpp8
-rw-r--r--src/frontend/mame/pluginopts.h15
2 files changed, 14 insertions, 9 deletions
diff --git a/src/frontend/mame/pluginopts.cpp b/src/frontend/mame/pluginopts.cpp
index 88119e52491..cfb04af21a4 100644
--- a/src/frontend/mame/pluginopts.cpp
+++ b/src/frontend/mame/pluginopts.cpp
@@ -7,7 +7,6 @@
Plugin options manager.
***************************************************************************/
-#include <fstream>
#include "emu.h"
#include "pluginopts.h"
@@ -15,6 +14,9 @@
#include <rapidjson/error/en.h>
#include <rapidjson/istreamwrapper.h>
+#include <fstream>
+
+
//**************************************************************************
// PLUGIN OPTIONS
//**************************************************************************
@@ -75,8 +77,8 @@ void plugin_options::parse_json(std::string path)
if (type=="plugin")
{
- m_descriptions.push_back(std::move(description));
- add_entry({ std::move(plugin_name) }, m_descriptions.back().c_str(), option_type::BOOLEAN, start ? "1" : "0");
+ auto const it = m_descriptions.emplace(m_descriptions.end(), std::move(description));
+ add_entry({ std::move(plugin_name) }, it->c_str(), option_type::BOOLEAN, start ? "1" : "0");
}
}
diff --git a/src/frontend/mame/pluginopts.h b/src/frontend/mame/pluginopts.h
index 4e78dfd0be6..f306c925ce2 100644
--- a/src/frontend/mame/pluginopts.h
+++ b/src/frontend/mame/pluginopts.h
@@ -7,24 +7,27 @@
Plugin options manager.
***************************************************************************/
+#ifndef MAME_FRONTEND_PLUGINOPTS_H
+#define MAME_FRONTEND_PLUGINOPTS_H
#pragma once
-#ifndef __PLUGIN_OPTS_H__
-#define __PLUGIN_OPTS_H__
-
#include "options.h"
+#include <list>
+#include <string>
+
+
class plugin_options : public core_options
{
public:
- // construction/destruction
plugin_options();
void parse_json(std::string path);
+
private:
static const options_entry s_option_entries[];
- std::vector<std::string> m_descriptions;
+ std::list<std::string const> m_descriptions;
};
-#endif /* __PLUGIN_OPTS_H__ */
+#endif // MAME_FRONTEND_PLUGINOPTS_H