From 2b8b55de4a18757e8d6769e458c84f7c1df1e261 Mon Sep 17 00:00:00 2001 From: Jed Barber Date: Mon, 13 Feb 2017 18:27:13 +1100 Subject: Swapped out crypto package for something smaller, revised other code and readme/notes slightly --- src/bundles-containers.adb | 19 +++++-------------- 1 file changed, 5 insertions(+), 14 deletions(-) (limited to 'src/bundles-containers.adb') diff --git a/src/bundles-containers.adb b/src/bundles-containers.adb index 8ba0d30..029d7c0 100644 --- a/src/bundles-containers.adb +++ b/src/bundles-containers.adb @@ -20,24 +20,15 @@ package body Bundles.Containers is use type Bundle_Maps.Cursor; use type Bundle_Vectors.Vector; - procedure Update_Bundle - (B : in out Bundle) is - begin - Add (B, Item); - end Update_Bundle; - - procedure Update_Vector - (C : in Candidates.CandidateID; - V : in out Bundle_Vectors.Vector) is - begin - V.Update_Element (V.First_Index, Update_Bundle'Access); - end Update_Vector; - Place : Candidates.CandidateID := Item (Given_Prefs.Preference_Range'First); Current_Cursor : Bundle_Maps.Cursor := BMap.Find (Place); begin if Current_Cursor /= Bundle_Maps.No_Element then - BMap.Update_Element (Current_Cursor, Update_Vector'Access); + declare + Vec_Ref : Bundle_Maps.Reference_Type := BMap.Reference (Current_Cursor); + begin + Add (Vec_Ref.Reference (Vec_Ref.First_Index), Item); + end; else declare New_Bundle : Bundle := Empty_Bundle; -- cgit