L : Natural renames HT.Lock;
begin
return R : constant Constant_Reference_Type :=
- (Element => Position.Node.Element'Access,
- Control =>
- (Controlled with Container'Unrestricted_Access))
+ (Element => Position.Node.Element'Access,
+ Control => (Controlled with Container'Unrestricted_Access))
do
B := B + 1;
L := L + 1;
if not Is_In (Right.HT, L_Node) then
declare
J : constant Hash_Type :=
- Hash (L_Node.Element) mod Buckets'Length;
+ Hash (L_Node.Element) mod Buckets'Length;
Bucket : Node_Access renames Buckets (J);
L_Node : Node_Access) return Boolean
is
R_Index : constant Hash_Type :=
- Element_Keys.Index (R_HT, L_Node.Element);
+ Element_Keys.Index (R_HT, L_Node.Element);
R_Node : Node_Access := R_HT.Buckets (R_Index);
L_Node : Node_Access) return Boolean
is
R_Index : constant Hash_Type :=
- Element_Keys.Index (R_HT, L_Node.Element);
+ Element_Keys.Index (R_HT, L_Node.Element);
R_Node : Node_Access := R_HT.Buckets (R_Index);
if Is_In (Right.HT, L_Node) then
declare
J : constant Hash_Type :=
- Hash (L_Node.Element) mod Buckets'Length;
+ Hash (L_Node.Element) mod Buckets'Length;
Bucket : Node_Access renames Buckets (J);
New_Item : Element_Type)
is
Node : constant Node_Access :=
- Element_Keys.Find (Container.HT, New_Item);
+ Element_Keys.Find (Container.HT, New_Item);
begin
if Node = null then
declare
Size : constant Hash_Type :=
- Prime_Numbers.To_Prime (Left.Length + Right.Length);
+ Prime_Numbers.To_Prime (Left.Length + Right.Length);
begin
Buckets := HT_Ops.New_Buckets (Length => Size);
end;
function New_Node (Next : Node_Access) return Node_Access is
Node : constant Node_Access :=
- new Node_Type'(Src_Node.Element, Next);
+ new Node_Type'(Src_Node.Element, Next);
begin
return Node;
end New_Node;
declare
Size : constant Hash_Type :=
- Prime_Numbers.To_Prime (Left.Length + Right.Length);
+ Prime_Numbers.To_Prime (Left.Length + Right.Length);
begin
Buckets := HT_Ops.New_Buckets (Length => Size);
end;
procedure Process (L_Node : Node_Access) is
J : constant Hash_Type :=
- Hash (L_Node.Element) mod Buckets'Length;
+ Hash (L_Node.Element) mod Buckets'Length;
begin
Buckets (J) := new Node_Type'(L_Node.Element, Buckets (J));
procedure Process (Src_Node : Node_Access) is
J : constant Hash_Type :=
- Hash (Src_Node.Element) mod Buckets'Length;
+ Hash (Src_Node.Element) mod Buckets'Length;
Tgt_Node : Node_Access := Buckets (J);
(Container : aliased Set;
Key : Key_Type) return Constant_Reference_Type
is
- Node : constant Node_Access :=
- Key_Keys.Find (Container.HT, Key);
+ Node : constant Node_Access := Key_Keys.Find (Container.HT, Key);
begin
if Node = null then
L : Natural renames HT.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;
(Container : Set;
Key : Key_Type) return Cursor
is
- Node : constant Node_Access :=
- Key_Keys.Find (Container.HT, Key);
+ Node : constant Node_Access := Key_Keys.Find (Container.HT, Key);
begin
if Node = null then
(Container : aliased in out Set;
Key : Key_Type) return Reference_Type
is
- Node : constant Node_Access :=
- Key_Keys.Find (Container.HT, Key);
+ Node : constant Node_Access := Key_Keys.Find (Container.HT, Key);
begin
if Node = null then
Key : Key_Type;
New_Item : Element_Type)
is
- Node : constant Node_Access :=
- Key_Keys.Find (Container.HT, Key);
+ Node : constant Node_Access := Key_Keys.Find (Container.HT, Key);
begin
if Node = null then