From 8c53c1438eb893ee9291c73e2ee26d34b5f8f2d7 Mon Sep 17 00:00:00 2001 From: Nathan Woods Date: Wed, 22 Feb 2017 23:11:38 -0500 Subject: 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 Note this is not passed around 'const', the reason being that the command line processing will now "eat" the vector --- src/lib/util/options.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/lib/util/options.h') 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 &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 &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 m_entrylist; // head of list of entries -- cgit v1.2.3-70-g09d2