diff options
author | Jed Barber <jjbarber@y7mail.com> | 2017-07-05 21:52:49 +1000 |
---|---|---|
committer | Jed Barber <jjbarber@y7mail.com> | 2017-07-05 21:52:49 +1000 |
commit | 52eb6622ee81c50dd41cfbc8ba53cc210c0e9b1e (patch) | |
tree | ce023c1386443df762d73795e1c1c9615da00887 /src/stv.adb | |
parent | fd71b0e74f89a7eb31e2a80a1b47614c2a59569f (diff) |
Simplified Bundle_Containers to use an array instead of a Map
Diffstat (limited to 'src/stv.adb')
-rw-r--r-- | src/stv.adb | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/src/stv.adb b/src/stv.adb index eb132cc..29b18c9 100644 --- a/src/stv.adb +++ b/src/stv.adb @@ -237,15 +237,18 @@ begin -- Set up and run the election singleton declare + subtype Valid_CandidateID is Candidates.CandidateID + range Candidate_Data.First_Index .. Candidate_Data.Last_Index; + package Given_Prefs is new Preferences - (Pref_Size => Integer (Below_Ballot.Length), - Above_Ballot => Above_Ballot, + (Above_Ballot => Above_Ballot, Below_Ballot => Below_Ballot); package Vote_Bundles is new Bundles (Given_Prefs => Given_Prefs); - package Vote_Bundle_Containers is new Vote_Bundles.Containers; + package Vote_Bundle_Containers is new Vote_Bundles.Containers + (Candidate_Range => Valid_CandidateID); package This_Election is new Election (Given_Bundles => Vote_Bundles, |