summaryrefslogtreecommitdiff
path: root/gcc/ada/a-cbmutr.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-cbmutr.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-cbmutr.adb')
-rw-r--r--gcc/ada/a-cbmutr.adb39
1 files changed, 19 insertions, 20 deletions
diff --git a/gcc/ada/a-cbmutr.adb b/gcc/ada/a-cbmutr.adb
index 32ab0828942..8e6c148e914 100644
--- a/gcc/ada/a-cbmutr.adb
+++ b/gcc/ada/a-cbmutr.adb
@@ -1737,19 +1737,14 @@ package body Ada.Containers.Bounded_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 --
----------------------
@@ -1818,6 +1813,14 @@ package body Ada.Containers.Bounded_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))
@@ -1841,7 +1844,6 @@ package body Ada.Containers.Bounded_Multiway_Trees is
if Is_Root (Position) then
Iterate_Children (T, Position.Node, Process);
-
else
Iterate_Subtree (T, Position.Node, Process);
end if;
@@ -1938,7 +1940,7 @@ package body Ada.Containers.Bounded_Multiway_Trees is
begin
if Is_Leaf (Position) then
- -- If sibling is present, return it.
+ -- If sibling is present, return it
if N.Next /= 0 then
return (Object.Container, N.Next);
@@ -1955,7 +1957,7 @@ package body Ada.Containers.Bounded_Multiway_Trees is
while Par.Next = 0 loop
Pos := Par.Parent;
- -- If we are back at the root the iteration is complete.
+ -- If we are back at the root the iteration is complete
if Pos = No_Node then
return No_Element;
@@ -1983,10 +1985,9 @@ package body Ada.Containers.Bounded_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;
@@ -2351,24 +2352,22 @@ package body Ada.Containers.Bounded_Multiway_Trees is
(Container : aliased Tree;
Position : Cursor) return Constant_Reference_Type
is
- begin
pragma Unreferenced (Container);
-
+ begin
return
(Element =>
- Position.Container.Elements (Position.Node)'Unchecked_Access);
+ Position.Container.Elements (Position.Node)'Unchecked_Access);
end Constant_Reference;
function Reference
(Container : aliased Tree;
Position : Cursor) return Reference_Type
is
- begin
pragma Unreferenced (Container);
-
+ begin
return
(Element =>
- Position.Container.Elements (Position.Node)'Unchecked_Access);
+ Position.Container.Elements (Position.Node)'Unchecked_Access);
end Reference;
--------------------