diff options
Diffstat (limited to 'native/jni/src/binary_format.h')
-rw-r--r-- | native/jni/src/binary_format.h | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/native/jni/src/binary_format.h b/native/jni/src/binary_format.h index fdc13bfb9..2ee4077c1 100644 --- a/native/jni/src/binary_format.h +++ b/native/jni/src/binary_format.h @@ -572,8 +572,8 @@ inline int BinaryFormat::computeFrequencyForBigram(const int unigramFreq, const // 0 for the bigram frequency represents the middle of the 16th step from the top, // while a value of 15 represents the middle of the top step. // See makedict.BinaryDictInputOutput for details. - const float stepSize = ((float)MAX_FREQ - unigramFreq) / (1.5f + MAX_BIGRAM_FREQ); - return (int)(unigramFreq + (bigramFreq + 1) * stepSize); + const float stepSize = (static_cast<float>(MAX_FREQ) - unigramFreq) / (1.5f + MAX_BIGRAM_FREQ); + return static_cast<int>(unigramFreq + (bigramFreq + 1) * stepSize); } // This returns a probability in log space. |