Skip to content

Commit

Permalink
Clean up final compilation warnings.
Browse files Browse the repository at this point in the history
  • Loading branch information
persan committed Apr 9, 2020
1 parent 7e65684 commit 85d0787
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 5 deletions.
4 changes: 2 additions & 2 deletions src/implementation/yaml-events-queue.adb
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ package body Yaml.Events.Queue is
((Data => Object.Data));

function New_Queue return Reference is
Ptr : constant not null access Instance := new Instance;
Ptr : constant not null Instance_Access := new Instance;
begin
return Reference'(Ada.Finalization.Controlled with Data => Ptr);
end New_Queue;
Expand All @@ -96,7 +96,7 @@ package body Yaml.Events.Queue is
end Element;

function As_Stream (Object : Reference'Class) return Stream_Reference is
Ptr : constant not null access Stream_Instance :=
Ptr : constant not null Stream_Instance_Access :=
new Stream_Instance'(Refcount_Base with Buffer => Reference (Object),
Offset => 0);
begin
Expand Down
6 changes: 3 additions & 3 deletions src/implementation/yaml-events-store.adb
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

package body Yaml.Events.Store is
function New_Store return Reference is
Ptr : constant not null access Instance := new Instance;
Ptr : constant not null Instance_Access := new Instance;
begin
return (Ada.Finalization.Controlled with Data => Ptr);
end New_Store;
Expand Down Expand Up @@ -208,7 +208,7 @@ package body Yaml.Events.Store is

function Retrieve (Object : Reference'Class; Position : Anchor_Cursor)
return Stream_Reference is
Ptr : constant not null access Stream_Instance :=
Ptr : constant not null Stream_Instance_Access :=
new Stream_Instance'(Refcount_Base with Object => Reference (Object),
Depth => 0, Current => Anchor_To_Index.Element
(Anchor_To_Index.Cursor (Position)).Position);
Expand All @@ -219,7 +219,7 @@ package body Yaml.Events.Store is

function Retrieve (Object : Reference'Class; Position : Element_Cursor)
return Stream_Reference is
Ptr : constant not null access Stream_Instance :=
Ptr : constant not null Stream_Instance_Access :=
new Stream_Instance'(Refcount_Base with Object => Reference (Object),
Depth => 0, Current => Positive (Position));
begin
Expand Down
2 changes: 2 additions & 0 deletions src/interface/yaml-events-queue.ads
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ private with Ada.Finalization;

package Yaml.Events.Queue is
type Instance is limited new Refcount_Base with private;
type Instance_Access is access all Instance'Class;
type Reference is tagged private;
type Accessor (Data : not null access Instance) is limited null record with
Implicit_Dereference => Data;
Expand All @@ -27,6 +28,7 @@ package Yaml.Events.Queue is
return Element_Accessor;

type Stream_Instance is new Refcount_Base with private;
type Stream_Instance_Access is access all Stream_Instance'Class;
type Stream_Reference is tagged private;
type Stream_Accessor (Data : not null access Stream_Instance) is limited
null record with Implicit_Dereference => Data;
Expand Down
3 changes: 3 additions & 0 deletions src/interface/yaml-events-store.ads
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ private with Ada.Containers.Hashed_Maps;

package Yaml.Events.Store is
type Instance is limited new Refcount_Base with private;
type Instance_Access is access all Instance'Class;
type Reference is tagged private;
type Optional_Reference is tagged private;

Expand Down Expand Up @@ -45,6 +46,8 @@ package Yaml.Events.Store is
procedure Copy (Source : in Instance; Target : in out Instance);

type Stream_Instance is limited new Refcount_Base with private;
type Stream_Instance_Access is access all Stream_Instance 'Class;

type Stream_Reference is tagged private;
type Optional_Stream_Reference is tagged private;
type Stream_Accessor (Data : not null access Stream_Instance) is limited
Expand Down

0 comments on commit 85d0787

Please sign in to comment.