Fixed empty default showing nothing in help (#205)

This commit is contained in:
Abhay Raj Singh 2019-10-14 07:08:11 +00:00 committed by jarro2783
parent 4a0af0e950
commit 073dd3e645

View File

@ -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;