mirror of
https://github.com/Relintai/rcpp_framework.git
synced 2024-11-14 04:57:21 +01:00
Properly process the last main arg in arg parser.
This commit is contained in:
parent
f31e57705f
commit
acfa601c80
@ -27,7 +27,6 @@ void ArgParser::parse_args(int argc, char **argv, int executable_index) {
|
|||||||
post_process_args();
|
post_process_args();
|
||||||
}
|
}
|
||||||
void ArgParser::parse_env(char **envp) {
|
void ArgParser::parse_env(char **envp) {
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void ArgParser::post_process_args() {
|
void ArgParser::post_process_args() {
|
||||||
@ -57,12 +56,16 @@ void ArgParser::post_process_args() {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (main_arg) {
|
||||||
|
arguments_set.insert(arg_main_command);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
bool ArgParser::has_arg(const String &arg) const {
|
bool ArgParser::has_arg(const String &arg) const {
|
||||||
std::set<String>::iterator search = arguments_set.find(arg);
|
std::set<String>::iterator search = arguments_set.find(arg);
|
||||||
|
|
||||||
return (search != arguments_set.end());
|
return (search != arguments_set.end());
|
||||||
}
|
}
|
||||||
|
|
||||||
String *ArgParser::get_value(const String &arg) {
|
String *ArgParser::get_value(const String &arg) {
|
||||||
|
Loading…
Reference in New Issue
Block a user