Skip to content

Commit

Permalink
clean up additional comments
Browse files Browse the repository at this point in the history
  • Loading branch information
tarheel committed Jun 23, 2019
1 parent 6fb5eb6 commit 78c572a
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions src/main/java/network/brightspots/rcv/Tabulator.java
Original file line number Diff line number Diff line change
Expand Up @@ -915,9 +915,6 @@ && isCandidateContinuing(cvr.getCurrentRecipientOfVote())) {
continue;
}

// handle testing in unit tests, remove this assert, and add break statement
// at end of this for loop

// If this fails, it means the code failed to handle an overvote with multiple
// continuing candidates.
assert selectedCandidate == null;
Expand All @@ -934,6 +931,12 @@ && isCandidateContinuing(cvr.getCurrentRecipientOfVote())) {
selectedCandidate,
roundTallyByPrecinct,
cvr.getPrecinct());

// There can be at most one continuing candidate in candidateSet; if there were more than
// one, we would have already flagged this as an overvote.
if (selectedCandidate != null) {
break;
}
}

// if we found a continuing candidate stop looking through rankings
Expand Down

0 comments on commit 78c572a

Please sign in to comment.