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