Fixed empty default showing nothing in help (#205)
This commit is contained in:
parent
4a0af0e950
commit
073dd3e645
@ -1512,9 +1512,16 @@ namespace cxxopts
|
||||
auto desc = o.desc;
|
||||
|
||||
if (o.has_default && (!o.is_boolean || o.default_value != "false"))
|
||||
{
|
||||
if(o.default_value != "")
|
||||
{
|
||||
desc += toLocalString(" (default: " + o.default_value + ")");
|
||||
}
|
||||
else
|
||||
{
|
||||
desc += toLocalString(" (default: \"\")");
|
||||
}
|
||||
}
|
||||
|
||||
String result;
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user