From 8a8204e62ad0c6d8f09af0d55f300648abde4e17 Mon Sep 17 00:00:00 2001 From: Tadahito Yao Date: Sun, 11 Apr 2021 21:24:22 +0900 Subject: [PATCH] Reverted one of zero value checks. --- src/textord/cjkpitch.cpp | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/src/textord/cjkpitch.cpp b/src/textord/cjkpitch.cpp index 57158415a5..3726f28575 100644 --- a/src/textord/cjkpitch.cpp +++ b/src/textord/cjkpitch.cpp @@ -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;