diff options
author | 2017-02-22 23:11:38 -0500 | |
---|---|---|
committer | 2017-02-22 23:13:41 -0500 | |
commit | 8c53c1438eb893ee9291c73e2ee26d34b5f8f2d7 (patch) | |
tree | 0544cad69bee0bd41e232abac03ab0ee5347edeb /src/lib/util/options.h | |
parent | 28ab42fe7bce6449885f48a1baa3ae2000a79115 (diff) |
Fixed an issue where device options (e.g. -cart) were reported as unknown when they actually worked
This change also changes around how command line arguments are passed around; specifically I changed argc/argv to be std::vector<std::string>
Note this is not passed around 'const', the reason being that the command line processing will now "eat" the vector
Diffstat (limited to 'src/lib/util/options.h')
-rw-r--r-- | src/lib/util/options.h | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/lib/util/options.h b/src/lib/util/options.h index fc6ab9849eb..ccbb24b1225 100644 --- a/src/lib/util/options.h +++ b/src/lib/util/options.h @@ -147,9 +147,9 @@ public: void remove_entry(entry &delentry); // parsing/input - bool parse_command_line(int argc, char **argv, int priority, std::string &error_string); + bool parse_command_line(std::vector<std::string> &args, int priority, std::string &error_string); bool parse_ini_file(util::core_file &inifile, int priority, int ignore_priority, std::string &error_string); - const char *find_within_command_line(int argc, char **argv, const char *name); + std::string pluck_from_command_line(std::vector<std::string> &args, const std::string &name); // reverting void revert(int priority_hi = OPTION_PRIORITY_MAXIMUM, int priority_lo = OPTION_PRIORITY_DEFAULT); @@ -188,7 +188,7 @@ private: void reset(); void append_entry(entry &newentry); void copyfrom(const core_options &src); - bool validate_and_set_data(entry &curentry, const char *newdata, int priority, std::string &error_string); + bool validate_and_set_data(entry &curentry, std::string &&newdata, int priority, std::string &error_string); // internal state simple_list<entry> m_entrylist; // head of list of entries |