Avoid unnecessary construction of deep strings

Especially when the -spec specifies that a string() is returned.
This commit is contained in:
Kostis Sagonas 2010-10-01 21:40:47 +08:00 committed by Juan Jose Comellas
parent 8f54692a29
commit 76cebab9a9

View File

@ -456,10 +456,10 @@ usage_options_reverse([{Name, Short, Long, _ArgSpec, Help} | Tail], Acc) ->
case Short of
% Only long form.
undefined ->
[$-, $-, Long];
[$-, $- | Long];
% Both short and long form.
_ ->
[$-, Short, $,, $\s, $-, $-, Long]
[$-, Short, $,, $\s, $-, $- | Long]
end
end,
usage_options_reverse(Tail, add_option_help(Prefix, Help, Acc));