Skip to content

Commit

Permalink
Rename member.
Browse files Browse the repository at this point in the history
  • Loading branch information
godunko committed Jan 23, 2024
1 parent 830666c commit 37eb89a
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 14 deletions.
29 changes: 16 additions & 13 deletions source/os/implementation/vss-command_line-parsers.adb
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ package body VSS.Command_Line.Parsers is
end if;

elsif Option in Multivalue_Positional_Option'Class then
Self.Defined_Multivalue_Option.Replace_Element
Self.Defined_Multivalue_Positional_Option.Replace_Element
(Multivalue_Positional_Option (Option));

else
Expand Down Expand Up @@ -254,9 +254,10 @@ package body VSS.Command_Line.Parsers is
Usage.Append (Option.Name);
end loop;

if not Self.Defined_Multivalue_Option.Is_Empty then
if not Self.Defined_Multivalue_Positional_Option.Is_Empty then
Usage.Append (' ');
Usage.Append (Self.Defined_Multivalue_Option.Element.Name);
Usage.Append
(Self.Defined_Multivalue_Positional_Option.Element.Name);
Usage.Append ('');
end if;

Expand Down Expand Up @@ -304,7 +305,7 @@ package body VSS.Command_Line.Parsers is
end if;

if not Self.Defined_Positional_Options.Is_Empty
or else not Self.Defined_Multivalue_Option.Is_Empty
or else not Self.Defined_Multivalue_Positional_Option.Is_Empty
then
Result.Append (VSS.Strings.Empty_Virtual_String);
Result.Append ("Arguments:");
Expand All @@ -320,13 +321,15 @@ package body VSS.Command_Line.Parsers is
end loop;
end if;

if not Self.Defined_Multivalue_Option.Is_Empty then
if not Self.Defined_Multivalue_Positional_Option.Is_Empty then
Option_Text.Clear;
Option_Text.Append (" ");
Option_Text.Append (Self.Defined_Multivalue_Option.Element.Name);
Option_Text.Append
(Self.Defined_Multivalue_Positional_Option.Element.Name);

Append_Option_Description
(Option_Text, Self.Defined_Multivalue_Option.Element.Description);
(Option_Text,
Self.Defined_Multivalue_Positional_Option.Element.Description);
end if;

return Result;
Expand All @@ -347,8 +350,8 @@ package body VSS.Command_Line.Parsers is

elsif Option in Multivalue_Positional_Option'Class then
return
not Self.Defined_Multivalue_Option.Is_Empty
and then Self.Defined_Multivalue_Option.Element
not Self.Defined_Multivalue_Positional_Option.Is_Empty
and then Self.Defined_Multivalue_Positional_Option.Element
= Multivalue_Positional_Option (Option)
and then Natural (Self.Defined_Positional_Options.Length)
< Self.Positional_Options_Values.Length;
Expand Down Expand Up @@ -655,7 +658,7 @@ package body VSS.Command_Line.Parsers is

else
if Self.Defined_Positional_Options.Is_Empty then
if Self.Defined_Multivalue_Option.Is_Empty then
if Self.Defined_Multivalue_Positional_Option.Is_Empty then
Self.Error_Message := "unexpected positional argument";
Success := False;

Expand All @@ -666,7 +669,7 @@ package body VSS.Command_Line.Parsers is
if Self.Positional_Options_Values.Length
= Natural (Self.Defined_Positional_Options.Length)
then
if Self.Defined_Multivalue_Option.Is_Empty then
if Self.Defined_Multivalue_Positional_Option.Is_Empty then
Self.Error_Message := "unexpected positional argument";
Success := False;

Expand Down Expand Up @@ -838,8 +841,8 @@ package body VSS.Command_Line.Parsers is
Option : Multivalue_Positional_Option'Class)
return VSS.String_Vectors.Virtual_String_Vector is
begin
if not Self.Defined_Multivalue_Option.Is_Empty
and then Self.Defined_Multivalue_Option.Element
if not Self.Defined_Multivalue_Positional_Option.Is_Empty
and then Self.Defined_Multivalue_Positional_Option.Element
= Multivalue_Positional_Option (Option)
then
return
Expand Down
2 changes: 1 addition & 1 deletion source/os/vss-command_line-parsers.ads
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,7 @@ private
Defined_Long_Options : Name_Sets.Set;
Defined_Named_Options : Named_Option_Maps.Map;
Defined_Positional_Options : Positional_Option_Vectors.Vector;
Defined_Multivalue_Option :
Defined_Multivalue_Positional_Option :
Multivalue_Positional_Option_Holders.Holder;

Error_Message : VSS.Strings.Virtual_String;
Expand Down

0 comments on commit 37eb89a

Please sign in to comment.