diff options
author | Nathan Woods <npwoods@mess.org> | 2017-04-17 08:17:04 -0400 |
---|---|---|
committer | Nathan Woods <npwoods@mess.org> | 2017-04-17 08:17:04 -0400 |
commit | 85b0d8bb04de03b815ed7edbe0f8f78139af9843 (patch) | |
tree | 7aea6d12b3e2e8d8033d893cd6240f2fa2226032 /src/lib/util | |
parent | 69d9706616807af96da3ef722620f886569b1c03 (diff) |
Pruned out some cruft in src/lib/util/options.[cpp|h]
Diffstat (limited to 'src/lib/util')
-rw-r--r-- | src/lib/util/options.cpp | 21 | ||||
-rw-r--r-- | src/lib/util/options.h | 12 |
2 files changed, 4 insertions, 29 deletions
diff --git a/src/lib/util/options.cpp b/src/lib/util/options.cpp index b835d0fa681..8500eda327d 100644 --- a/src/lib/util/options.cpp +++ b/src/lib/util/options.cpp @@ -56,7 +56,6 @@ const char *const core_options::s_option_unadorned[MAX_UNADORNED_OPTIONS] = core_options::entry::entry(const char *name, const char *description, uint32_t flags, const char *defvalue) : m_next(nullptr), m_flags(flags), - m_seqid(0), m_error_reported(false), m_priority(OPTION_PRIORITY_DEFAULT), m_description(description), @@ -111,7 +110,6 @@ void core_options::entry::set_value(const char *newdata, int priority) // set the data and priority, then bump the sequence m_data = newdata; m_priority = priority; - m_seqid++; } @@ -684,16 +682,6 @@ int core_options::priority(const char *name) const //------------------------------------------------- -// seqid - return the seqid for a given option -//------------------------------------------------- - -uint32_t core_options::seqid(const char *name) const -{ - auto curentry = m_entrymap.find(name); - return (curentry != m_entrymap.end()) ? curentry->second->seqid() : 0; -} - -//------------------------------------------------- // exists - return if option exists in list //------------------------------------------------- @@ -702,16 +690,7 @@ bool core_options::exists(const char *name) const return (m_entrymap.find(name) != m_entrymap.end()); } -//------------------------------------------------- -// is_changed - return if option have been marked -// changed -//------------------------------------------------- -bool core_options::is_changed(const char *name) const -{ - auto curentry = m_entrymap.find(name); - return (curentry != m_entrymap.end()) ? curentry->second->is_changed() : false; -} //------------------------------------------------- // set_value - set the raw option value //------------------------------------------------- diff --git a/src/lib/util/options.h b/src/lib/util/options.h index 637481b12b2..edf7f8600c8 100644 --- a/src/lib/util/options.h +++ b/src/lib/util/options.h @@ -8,8 +8,8 @@ ***************************************************************************/ -#ifndef __OPTIONS_H__ -#define __OPTIONS_H__ +#ifndef MAME_LIB_UTIL_OPTIONS_H +#define MAME_LIB_UTIL_OPTIONS_H #include "corefile.h" #include <unordered_map> @@ -81,7 +81,6 @@ public: const char *default_value() const { return m_defdata.c_str(); } const char *minimum() const { return m_minimum.c_str(); } const char *maximum() const { return m_maximum.c_str(); } - uint32_t seqid() const { return m_seqid; } int type() const { return (m_flags & OPTION_TYPE_MASK); } uint32_t flags() const { return m_flags; } bool is_header() const { return type() == OPTION_HEADER; } @@ -103,7 +102,6 @@ public: // internal state entry * m_next; // link to the next data uint32_t m_flags; // flags from the entry - uint32_t m_seqid; // sequence ID; bumped on each change bool m_error_reported; // have we reported an error on this option yet? int m_priority; // priority of the data set const char * m_description; // description for this item @@ -130,7 +128,7 @@ public: // getters entry *first() const { return m_entrylist.first(); } - const char *command() const { return m_command.c_str(); } + const std::string &command() const { return m_command; } entry *get_entry(const char *name) const; // range iterators @@ -165,9 +163,7 @@ public: bool bool_value(const char *name) const { return (atoi(value(name)) != 0); } int int_value(const char *name) const { return atoi(value(name)); } float float_value(const char *name) const { return atof(value(name)); } - uint32_t seqid(const char *name) const; bool exists(const char *name) const; - bool is_changed(const char *name) const; // setting bool set_value(const char *name, const char *value, int priority, std::string &error_string); @@ -210,4 +206,4 @@ private: -#endif /* __OPTIONS_H__ */ +#endif // MAME_LIB_UTIL_OPTIONS_H |