Simplify Walk_Finished procedure
authorAdrian-Ken Rueegsegger <ken@codelabs.ch>
Mon, 2 Oct 2017 16:36:45 +0000 (18:36 +0200)
committerAdrian-Ken Rueegsegger <ken@codelabs.ch>
Fri, 27 Oct 2017 10:42:53 +0000 (12:42 +0200)
Make Check_Finished a regular nested function instead of a nested generic
function that needs to be instantiated.

Signed-off-by: Adrian-Ken Rueegsegger <ken@codelabs.ch>
src/hw-dbc-transfer_info.adb

index 44165d92d25538ba0cbe87a4e6309b99e770bf38..b49264fee53c26804dad3e4baf9405b0109beab1 100644 (file)
@@ -279,8 +279,6 @@ is
       Id          :    out Transfer_Id;
       Success     :    out Boolean)
    is
-      generic
-         Endpoint : Endpoint_Range;
       function Check_Finished (Id : Transfer_Id) return Boolean;
       function Check_Finished (Id : Transfer_Id) return Boolean
       is
@@ -290,8 +288,8 @@ is
             Xfers (Id).Started and
             Xfers (Id).Finished;
       end Check_Finished;
-      function Check_Finished_Inst is new Check_Finished (Endpoint);
-      procedure Walk_Finished_Inst is new Walk (Check_Finished_Inst);
+
+      procedure Walk_Finished_Inst is new Walk (Check_Finished);
    begin
       Walk_Finished_Inst (Minimum_Ctr, Id, Success);
    end Walk_Finished;