summaryrefslogtreecommitdiff
path: root/gcc/ada/a-cimutr.adb
diff options
context:
space:
mode:
authorcharlet <charlet@138bc75d-0d04-0410-961f-82ee72b054a4>2011-09-27 09:37:53 +0000
committercharlet <charlet@138bc75d-0d04-0410-961f-82ee72b054a4>2011-09-27 09:37:53 +0000
commitf52e508dca0d6bb1f0ba72882961142469942566 (patch)
tree37169ca0c07156d926d1fe1e342b29d21ab6db1c /gcc/ada/a-cimutr.adb
parentc5bd783914e5754e51e35348838500f5e85f30c7 (diff)
downloadgcc-f52e508dca0d6bb1f0ba72882961142469942566.tar.gz
2011-09-27 Pascal Obry <obry@adacore.com>
* s-taspri-posix-noaltstack.ads (RW_Lock): This type is now defined as OS_Interface.pthread_rwlock_t. 2011-09-27 Robert Dewar <dewar@adacore.com> * exp_ch9.adb, a-cimutr.adb, a-cimutr.ads, gnat1drv.adb, a-comutr.adb, a-comutr.ads, exp_dist.adb, a-cbmutr.adb, a-cbmutr.ads, sem_ch5.adb, sem_util.adb: Minor reformatting. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@179252 138bc75d-0d04-0410-961f-82ee72b054a4
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;