summaryrefslogtreecommitdiff
path: root/gcc/ada/a-comutr.adb
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/ada/a-comutr.adb')
-rw-r--r--gcc/ada/a-comutr.adb20
1 files changed, 11 insertions, 9 deletions
diff --git a/gcc/ada/a-comutr.adb b/gcc/ada/a-comutr.adb
index 17b70d4dc1b..e3e25573e53 100644
--- a/gcc/ada/a-comutr.adb
+++ b/gcc/ada/a-comutr.adb
@@ -1348,19 +1348,14 @@ package body Ada.Containers.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 --
----------------------
@@ -1421,6 +1416,14 @@ package body Ada.Containers.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))
@@ -1438,7 +1441,6 @@ package body Ada.Containers.Multiway_Trees is
if Is_Root (Position) then
Iterate_Children (Position.Container, Position.Node, Process);
-
else
Iterate_Subtree (Position.Container, Position.Node, Process);
end if;