diff --git a/src/classify/intmatcher.cpp b/src/classify/intmatcher.cpp index 8250ddd8..c6a5ea44 100644 --- a/src/classify/intmatcher.cpp +++ b/src/classify/intmatcher.cpp @@ -44,8 +44,8 @@ using tesseract::UnicharRating; // Parameters of the sigmoid used to convert similarity to evidence in the // similarity_evidence_table_ that is used to convert distance metric to an // 8 bit evidence value in the secondary matcher. (See IntMatcher::Init). -const float IntegerMatcher::kSEExponentialMultiplier = 0.0; -const float IntegerMatcher::kSimilarityCenter = 0.0075; +const float IntegerMatcher::kSEExponentialMultiplier = 0.0f; +const float IntegerMatcher::kSimilarityCenter = 0.0075f; static const uint8_t offset_table[] = { 255, 0, 1, 0, 2, 0, 1, 0, 3, 0, 1, 0, 2, 0, 1, 0, 4, 0, 1, 0, 2, 0, 1, 0, 3, @@ -402,7 +402,7 @@ class ClassPruner { results->init_to_size(num_classes_, empty); for (int c = 0; c < num_classes_; ++c) { (*results)[c].Class = sort_index_[num_classes_ - c]; - (*results)[c].Rating = 1.0 - sort_key_[num_classes_ - c] / + (*results)[c].Rating = 1.0f - sort_key_[num_classes_ - c] / (static_cast(CLASS_PRUNER_CLASS_MASK) * num_features_); } return num_classes_;