diff options
Diffstat (limited to 'src/election.adb')
-rw-r--r-- | src/election.adb | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/src/election.adb b/src/election.adb index 181da64..6a7892f 100644 --- a/src/election.adb +++ b/src/election.adb @@ -467,7 +467,8 @@ package body Election is Fractional_Loss => Fractional_Loss, Exhausted_Loss => Exhausted_Loss); - Pref_Data.Reference (This_Transfer.From).Delete (Pref_Data.Reference (This_Transfer.From).First_Index); + Pref_Data.Reference (This_Transfer.From).Delete + (Pref_Data.Reference (This_Transfer.From).First_Index); Fractional.Paper_Change := Fractional.Paper_Change + Fractional_Loss; Exhausted.Paper_Change := Exhausted.Paper_Change + Exhausted_Loss; @@ -478,13 +479,13 @@ package body Election is Entry_Ref : Entry_Vectors.Reference_Type := Entries.Reference (This_Transfer.Position); begin - Entry_Ref.Paper_Change := - Entry_Ref.Total_Papers; + Entry_Ref.Paper_Change := -Entry_Ref.Total_Papers; Entry_Ref.Total_Papers := 0; if Entry_Ref.Status = Elected then Entry_Ref.Vote_Change := Quota - Entry_Ref.Total_Votes; Entry_Ref.Total_Votes := Quota; else - Entry_Ref.Vote_Change := - Entry_Ref.Total_Votes; + Entry_Ref.Vote_Change := -Entry_Ref.Total_Votes; Entry_Ref.Total_Votes := 0; end if; end; @@ -557,14 +558,15 @@ package body Election is for R in Running.Iterate loop Votes_To_Be_Excluded := Running.Reference (R).Total_Votes; - exit when Number_Excluded > 0 and Votes_Excluded + Votes_To_Be_Excluded > Applied_Breakpoint; + exit when Number_Excluded > 0 and + Votes_Excluded + Votes_To_Be_Excluded > Applied_Breakpoint; Working_Position := Running.Reference (R).Index; Working_ID := Entries.Reference (Working_Position).ID; Entries.Reference (Working_Position).Status := Excluded; Entries.Reference (Working_Position).Changed := True; - Transfers.Append ( (From => Working_ID, Position => Working_Position, Value => 1 / 1) ); + Transfers.Append ((From => Working_ID, Position => Working_Position, Value => 1 / 1)); Votes_Excluded := Votes_Excluded + Votes_To_Be_Excluded; Number_Excluded := Number_Excluded + 1; end loop; |