summaryrefslogtreecommitdiff
path: root/gcc/ada/a-cimutr.adb
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/ada/a-cimutr.adb')
-rw-r--r--gcc/ada/a-cimutr.adb28
1 files changed, 15 insertions, 13 deletions
diff --git a/gcc/ada/a-cimutr.adb b/gcc/ada/a-cimutr.adb
index 96c1fe26d7a..6b9d7b6b2f1 100644
--- a/gcc/ada/a-cimutr.adb
+++ b/gcc/ada/a-cimutr.adb
@@ -1305,19 +1305,14 @@ package body Ada.Containers.Indefinite_Multiway_Trees is
return Tree_Iterator_Interfaces.Forward_Iterator'Class
is
Root_Cursor : constant Cursor :=
- (Container'Unrestricted_Access, Root_Node (Container));
+ (Container'Unrestricted_Access, Root_Node (Container));
begin
return
Iterator'(Container'Unrestricted_Access,
- First_Child (Root_Cursor), From_Root => True);
+ First_Child (Root_Cursor),
+ From_Root => True);
end Iterate;
- function Iterate_Subtree (Position : Cursor)
- return Tree_Iterator_Interfaces.Forward_Iterator'Class is
- begin
- return Iterator'(Position.Container, Position, From_Root => False);
- end Iterate_Subtree;
-
----------------------
-- Iterate_Children --
----------------------
@@ -1378,6 +1373,14 @@ package body Ada.Containers.Indefinite_Multiway_Trees is
-- Iterate_Subtree --
---------------------
+ function Iterate_Subtree
+ (Position : Cursor)
+ return Tree_Iterator_Interfaces.Forward_Iterator'Class
+ is
+ begin
+ return Iterator'(Position.Container, Position, From_Root => False);
+ end Iterate_Subtree;
+
procedure Iterate_Subtree
(Position : Cursor;
Process : not null access procedure (Position : Cursor))
@@ -1498,7 +1501,7 @@ package body Ada.Containers.Indefinite_Multiway_Trees is
begin
if Is_Leaf (Position) then
- -- If sibling is present, return it.
+ -- If sibling is present, return it
if N.Next /= null then
return (Object.Container, N.Next);
@@ -1513,7 +1516,7 @@ package body Ada.Containers.Indefinite_Multiway_Trees is
begin
while Par.Next = null loop
- -- If we are back at the root the iteration is complete.
+ -- If we are back at the root the iteration is complete
if Par = Root_Node (T) then
return No_Element;
@@ -1541,10 +1544,9 @@ package body Ada.Containers.Indefinite_Multiway_Trees is
end;
end if;
- else
-
- -- If an internal node, return its first child.
+ -- If an internal node, return its first child
+ else
return (Object.Container, N.Children.First);
end if;
end Next;