mirror of
https://github.com/Laupetin/OpenAssetTools.git
synced 2025-04-20 16:15:43 +00:00
Utils: Fix UsageInformation still outputting a dash when no short name is specified. Same for long name.
This commit is contained in:
parent
af55c202cf
commit
5f833969f9
@ -88,14 +88,18 @@ void UsageInformation::Print()
|
||||
|
||||
for (auto option : category.second)
|
||||
{
|
||||
str << std::setw(longestShortName + 1) << "-" + option->m_short_name;
|
||||
str << std::setw(static_cast<std::streamsize>(longestShortName) + 1) << (!option->m_short_name.empty()
|
||||
? "-" + option->m_short_name
|
||||
: "");
|
||||
|
||||
if (!option->m_short_name.empty() && !option->m_long_name.empty())
|
||||
str << ", ";
|
||||
else
|
||||
str << " ";
|
||||
|
||||
str << std::setw(longestLongName + 2) << "--" + option->m_long_name;
|
||||
str << std::setw(static_cast<std::streamsize>(longestLongName) + 2) << (!option->m_long_name.empty()
|
||||
? "--" + option->m_long_name
|
||||
: "");
|
||||
|
||||
str << " ";
|
||||
str << std::setw(longestArgumentLength) << GetOptionArgument(option);
|
||||
|
Loading…
x
Reference in New Issue
Block a user