From 57ed77b598efe9c02d160c2ca3cc55512eeb7f29 Mon Sep 17 00:00:00 2001 From: Ian Jackson Date: Tue, 23 Aug 2016 13:46:39 +0100 Subject: [PATCH] compute-scottish-stv: make --for-compare list winners too --- compute-scottish-stv | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/compute-scottish-stv b/compute-scottish-stv index 40a6667..43d3a72 100755 --- a/compute-scottish-stv +++ b/compute-scottish-stv @@ -220,6 +220,12 @@ sub countballots () { push @pr, $c; } + if ($for_compare) { + # for comparison with OpenSTV, which always prints + # the quota for every elected candidate + push @pr, { %$_, Total => $quota } foreach @elected; + } + foreach my $c (reverse sort $display_cmp @pr) { prf "candidate %-10s: %s votes\n", $c->{Cand}, sv $c->{Total}; } -- 2.30.2