summaryrefslogtreecommitdiffstatshomepage
path: root/src/lib
diff options
context:
space:
mode:
author npwoods <npwoods@mess.org>2022-05-29 12:47:53 -0400
committer GitHub <noreply@github.com>2022-05-30 02:47:53 +1000
commit260f9068045af9a434f8d0eb7c662ad8d34cbbe5 (patch)
treed68f53690a52cbc2ce73e4a333bb56a74b7c1cde /src/lib
parent5155e51bbe24d0cc45a84ddb66138f83ff1810cf (diff)
util/options.h: Removed legacy OPTION_* option type constants. (#9851)
These constants were polluting the global namespace.
Diffstat (limited to 'src/lib')
-rw-r--r--src/lib/util/options.cpp10
-rw-r--r--src/lib/util/options.h10
2 files changed, 5 insertions, 15 deletions
diff --git a/src/lib/util/options.cpp b/src/lib/util/options.cpp
index 8b7e8018528..cac92c37020 100644
--- a/src/lib/util/options.cpp
+++ b/src/lib/util/options.cpp
@@ -273,12 +273,12 @@ void core_options::entry::validate(const std::string &data)
}
break;
- case OPTION_STRING:
+ case core_options::option_type::STRING:
// strings can be anything
break;
- case OPTION_INVALID:
- case OPTION_HEADER:
+ case core_options::option_type::INVALID:
+ case core_options::option_type::HEADER:
default:
// anything else is invalid
throw options_error_exception("Attempted to set invalid option %s\n", name());
@@ -656,7 +656,7 @@ void core_options::parse_command_line(const std::vector<std::string> &args, int
if (!args[arg].empty() && args[arg][0] == '-')
{
auto curentry = get_entry(&args[arg][1]);
- if (curentry && curentry->type() == OPTION_COMMAND)
+ if (curentry && curentry->type() == core_options::option_type::COMMAND)
{
// can only have one command
if (!m_command.empty())
@@ -694,7 +694,7 @@ void core_options::parse_command_line(const std::vector<std::string> &args, int
}
// at this point, we've already processed commands
- if (curentry->type() == OPTION_COMMAND)
+ if (curentry->type() == core_options::option_type::COMMAND)
continue;
// get the data for this argument, special casing booleans
diff --git a/src/lib/util/options.h b/src/lib/util/options.h
index 9b43e771c51..57ca7160203 100644
--- a/src/lib/util/options.h
+++ b/src/lib/util/options.h
@@ -280,14 +280,4 @@ struct options_entry
const char * description; // description for -showusage
};
-// legacy option types
-const core_options::option_type OPTION_INVALID = core_options::option_type::INVALID;
-const core_options::option_type OPTION_HEADER = core_options::option_type::HEADER;
-const core_options::option_type OPTION_COMMAND = core_options::option_type::COMMAND;
-const core_options::option_type OPTION_BOOLEAN = core_options::option_type::BOOLEAN;
-const core_options::option_type OPTION_INTEGER = core_options::option_type::INTEGER;
-const core_options::option_type OPTION_FLOAT = core_options::option_type::FLOAT;
-const core_options::option_type OPTION_STRING = core_options::option_type::STRING;
-
-
#endif // MAME_LIB_UTIL_OPTIONS_H