diff options
Diffstat (limited to 'src/lib/util')
-rw-r--r-- | src/lib/util/options.c | 9 | ||||
-rw-r--r-- | src/lib/util/options.h | 1 |
2 files changed, 10 insertions, 0 deletions
diff --git a/src/lib/util/options.c b/src/lib/util/options.c index 01022a1665d..ac7897fb6d3 100644 --- a/src/lib/util/options.c +++ b/src/lib/util/options.c @@ -556,6 +556,15 @@ UINT32 core_options::seqid(const char *name) const return (curentry != NULL) ? curentry->seqid() : 0; } +//------------------------------------------------- +// exists - return if option exists in list +//------------------------------------------------- + +bool core_options::exists(const char *name) const +{ + entry *curentry = m_entrymap.find(name); + return (curentry != NULL); +} //------------------------------------------------- // set_value - set the raw option value diff --git a/src/lib/util/options.h b/src/lib/util/options.h index 4ef8a6b1170..03aa293bebf 100644 --- a/src/lib/util/options.h +++ b/src/lib/util/options.h @@ -175,6 +175,7 @@ public: int int_value(const char *name) const { return atoi(value(name)); } float float_value(const char *name) const { return atof(value(name)); } UINT32 seqid(const char *name) const; + bool exists(const char *name) const; // setting void set_command(const char *command); |