summaryrefslogtreecommitdiff
path: root/src/bundles-containers.adb
diff options
context:
space:
mode:
Diffstat (limited to 'src/bundles-containers.adb')
-rw-r--r--src/bundles-containers.adb12
1 files changed, 7 insertions, 5 deletions
diff --git a/src/bundles-containers.adb b/src/bundles-containers.adb
index 4c318d6..2dc9712 100644
--- a/src/bundles-containers.adb
+++ b/src/bundles-containers.adb
@@ -33,15 +33,18 @@ package body Bundles.Containers is
begin
if Current_Cursor /= Bundle_Maps.No_Element then
declare
- Vec_Ref : Bundle_Maps.Reference_Type := BMap.Reference (Current_Cursor);
+ Vec_Ref : Bundle_Maps.Reference_Type :=
+ BMap.Reference (Current_Cursor);
+ Bundle_Ref : Bundle_Vectors.Reference_Type :=
+ Vec_Ref.Reference (Vec_Ref.First_Index);
begin
- Add (Vec_Ref.Reference (Vec_Ref.First_Index), Item);
+ Bundle_Ref.Papers.Append (Item);
end;
else
declare
New_Bundle : Bundle := Empty_Bundle;
begin
- Add (New_Bundle, Item);
+ New_Bundle.Papers.Append (Item);
BMap.Insert (Place, Bundle_Vectors.Empty_Vector & New_Bundle);
end;
end if;
@@ -56,7 +59,6 @@ package body Bundles.Containers is
is
package My_CSV is new CSV;
use Ada.Text_IO;
- use type Ada.Containers.Count_Type;
use type Candidates.CandidateID;
Input_File : File_Type;
@@ -68,7 +70,7 @@ package body Bundles.Containers is
Result := Bundle_Maps.Empty_Map;
while not End_Of_File (Input_File) loop
Current_Record := My_CSV.Parse_Line (Get_Line (Input_File));
- if Current_Record.Length > 0 then
+ if Integer (Current_Record.Length) > 0 then
Current_Prefs := Given_Prefs.Parse_Preferences (SU.To_String (Current_Record.Last_Element));
if Current_Prefs (Given_Prefs.Preference_Range'First) /= Candidates.No_Candidate then
Add_To_Map (Result, Current_Prefs);