summaryrefslogtreecommitdiff
path: root/src/bundles-containers.adb
diff options
context:
space:
mode:
authorJed Barber <jjbarber@y7mail.com>2017-02-13 18:27:13 +1100
committerJed Barber <jjbarber@y7mail.com>2017-02-13 18:27:13 +1100
commit2b8b55de4a18757e8d6769e458c84f7c1df1e261 (patch)
treecbd62219babccc04e57fa7708f88385a7f6413d3 /src/bundles-containers.adb
parent2b842cb65ce29071d5786bdecc834c026d1f2db2 (diff)
Swapped out crypto package for something smaller, revised other code and readme/notes slightly
Diffstat (limited to 'src/bundles-containers.adb')
-rw-r--r--src/bundles-containers.adb19
1 files changed, 5 insertions, 14 deletions
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;