mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 21:37:35 +00:00
LibCore: Add ignored options to ArgsParser
This commit is contained in:
parent
68c457b601
commit
1b3090bf3c
2 changed files with 16 additions and 0 deletions
|
@ -253,6 +253,21 @@ void ArgsParser::add_option(Option&& option)
|
|||
m_options.append(move(option));
|
||||
}
|
||||
|
||||
void ArgsParser::add_ignored(const char* long_name, char short_name)
|
||||
{
|
||||
Option option {
|
||||
false,
|
||||
"Ignored",
|
||||
long_name,
|
||||
short_name,
|
||||
nullptr,
|
||||
[](const char*) {
|
||||
return true;
|
||||
}
|
||||
};
|
||||
add_option(move(option));
|
||||
}
|
||||
|
||||
void ArgsParser::add_option(bool& value, const char* help_string, const char* long_name, char short_name)
|
||||
{
|
||||
Option option {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue