Skip to content

Commit

Permalink
Reverted one of zero value checks.
Browse files Browse the repository at this point in the history
  • Loading branch information
eighttails committed Apr 11, 2021
1 parent 05eef74 commit 8a8204e
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions src/textord/cjkpitch.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -158,10 +158,8 @@ class LocalCorrelation {
float rc = 0;
int vote = 0;
for (int i = start; i < end; i++) {
if (values_[i].x != 0.0f) {
rc += values_[i].vote * x * values_[i].y / values_[i].x;
vote += values_[i].vote;
}
rc += values_[i].vote * x * values_[i].y / values_[i].x;
vote += values_[i].vote;
}

return vote == 0 ? 0.0f : rc / vote;
Expand Down

0 comments on commit 8a8204e

Please sign in to comment.