aboutsummaryrefslogtreecommitdiffstats
path: root/native/jni/src/binary_format.h
diff options
context:
space:
mode:
authorKen Wakasa <kwakasa@google.com>2012-08-02 19:48:08 +0900
committerKen Wakasa <kwakasa@google.com>2012-08-02 20:19:39 +0900
commit77e8e81ad95cfc1eb8f8407fc872674b8d08bbe9 (patch)
tree7bb46286f51ff0a1349577cc741940d21e918603 /native/jni/src/binary_format.h
parentffe36cdc6d41d0ad1031e7d9f8acf6b6f1008970 (diff)
downloadlatinime-77e8e81ad95cfc1eb8f8407fc872674b8d08bbe9.tar.gz
latinime-77e8e81ad95cfc1eb8f8407fc872674b8d08bbe9.tar.xz
latinime-77e8e81ad95cfc1eb8f8407fc872674b8d08bbe9.zip
Header cleanup. Moved a couple of functions from .h to .cpp.
Change-Id: Ifd12a7632f75395bd0ef5e394d5c2abd6cbe28c6
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.