aboutsummaryrefslogtreecommitdiffstats
path: root/native/jni/src/binary_format.h
diff options
context:
space:
mode:
authorKen Wakasa <kwakasa@google.com>2012-08-02 15:08:38 -0700
committerAndroid Git Automerger <android-git-automerger@android.com>2012-08-02 15:08:38 -0700
commit50d7388e6d864858c253ecfde1cf27c09ca2096a (patch)
treef4fef1f9e39fa1e429092de52afcb431131ecd7d /native/jni/src/binary_format.h
parent00fe40242c298bc7863432b3c386c40a7ccf19a0 (diff)
parent6c465d9d26c7389357dedd4b71c6a95ccb6f019c (diff)
downloadlatinime-50d7388e6d864858c253ecfde1cf27c09ca2096a.tar.gz
latinime-50d7388e6d864858c253ecfde1cf27c09ca2096a.tar.xz
latinime-50d7388e6d864858c253ecfde1cf27c09ca2096a.zip
am 6c465d9d: am 77e8e81a: Header cleanup. Moved a couple of functions from .h to .cpp.
* commit '6c465d9d26c7389357dedd4b71c6a95ccb6f019c': Header cleanup. Moved a couple of functions from .h to .cpp.
Diffstat (limited to 'native/jni/src/binary_format.h')
-rw-r--r--native/jni/src/binary_format.h4
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.