L : Natural renames T.Lock;
begin
return R : constant Constant_Reference_Type :=
- (Element => Position.Node.Element'Access,
- Control => (Controlled with Position.Container))
+ (Element => Position.Node.Element'Access,
+ Control => (Controlled with Position.Container))
do
B := B + 1;
L := L + 1;
end Constant_Reference;
function Constant_Reference
- (Container : Map;
+ (Container : aliased Map;
Key : Key_Type) return Constant_Reference_Type
is
Node : constant Node_Access := Key_Ops.Find (Container.Tree, Key);
L : Natural renames T.Lock;
begin
return R : constant Constant_Reference_Type :=
- (Element => Node.Element'Access,
- Control =>
- (Controlled with Container'Unrestricted_Access))
+ (Element => Node.Element'Access,
+ Control => (Controlled with Container'Unrestricted_Access))
do
B := B + 1;
L := L + 1;
function Copy_Node (Source : Node_Access) return Node_Access is
Target : constant Node_Access :=
- new Node_Type'(Color => Source.Color,
- Key => Source.Key,
- Element => Source.Element,
- Parent => null,
- Left => null,
- Right => null);
+ new Node_Type'(Color => Source.Color,
+ Key => Source.Key,
+ Element => Source.Element,
+ Parent => null,
+ Left => null,
+ Right => null);
begin
return Target;
end Copy_Node;
-- for a reverse iterator, Container.Last is the beginning.
return It : constant Iterator :=
- (Limited_Controlled with
- Container => Container'Unrestricted_Access,
- Node => null)
+ (Limited_Controlled with
+ Container => Container'Unrestricted_Access,
+ Node => null)
do
B := B + 1;
end return;
-- is a forward or reverse iteration.
return It : constant Iterator :=
- (Limited_Controlled with
- Container => Container'Unrestricted_Access,
- Node => Start.Node)
+ (Limited_Controlled with
+ Container => Container'Unrestricted_Access,
+ Node => Start.Node)
do
B := B + 1;
end return;
"Position cursor of Next is bad");
declare
- Node : constant Node_Access :=
- Tree_Operations.Next (Position.Node);
+ Node : constant Node_Access := Tree_Operations.Next (Position.Node);
begin
if Node = null then
declare
Node : constant Node_Access :=
- Tree_Operations.Previous (Position.Node);
+ Tree_Operations.Previous (Position.Node);
begin
if Node = null then
L : Natural renames T.Lock;
begin
return R : constant Reference_Type :=
- (Element => Position.Node.Element'Access,
- Control => (Controlled with Position.Container))
+ (Element => Position.Node.Element'Access,
+ Control => (Controlled with Position.Container))
do
B := B + 1;
L := L + 1;
L : Natural renames T.Lock;
begin
return R : constant Reference_Type :=
- (Element => Node.Element'Access,
- Control =>
- (Controlled with Container'Unrestricted_Access))
+ (Element => Node.Element'Access,
+ Control => (Controlled with Container'Unrestricted_Access))
do
B := B + 1;
L := L + 1;