mirror of
https://git.wownero.com/wownero/wownero.git
synced 2024-08-15 01:03:23 +00:00
command_line::get_arg: remove 'required' for dependent args as they're always optional
This commit is contained in:
parent
450306a01c
commit
55f8d917fd
1 changed files with 3 additions and 3 deletions
|
@ -227,8 +227,8 @@ namespace command_line
|
||||||
return vm[arg.name].defaulted();
|
return vm[arg.name].defaulted();
|
||||||
}
|
}
|
||||||
|
|
||||||
template<typename T, bool required>
|
template<typename T>
|
||||||
T get_arg(const boost::program_options::variables_map& vm, const arg_descriptor<T, required, true>& arg)
|
T get_arg(const boost::program_options::variables_map& vm, const arg_descriptor<T, false, true>& arg)
|
||||||
{
|
{
|
||||||
return arg.depf(get_arg(vm, arg.ref), is_arg_defaulted(vm, arg), vm[arg.name].template as<T>());
|
return arg.depf(get_arg(vm, arg.ref), is_arg_defaulted(vm, arg), vm[arg.name].template as<T>());
|
||||||
}
|
}
|
||||||
|
@ -242,7 +242,7 @@ namespace command_line
|
||||||
template<bool dependent>
|
template<bool dependent>
|
||||||
inline bool has_arg(const boost::program_options::variables_map& vm, const arg_descriptor<bool, false, dependent>& arg)
|
inline bool has_arg(const boost::program_options::variables_map& vm, const arg_descriptor<bool, false, dependent>& arg)
|
||||||
{
|
{
|
||||||
return get_arg<bool, false>(vm, arg);
|
return get_arg(vm, arg);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue