summaryrefslogtreecommitdiff
path: root/src/stv.adb
diff options
context:
space:
mode:
Diffstat (limited to 'src/stv.adb')
-rw-r--r--src/stv.adb9
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,