aboutsummaryrefslogtreecommitdiffstats
path: root/native/jni/src/proximity_info_state.cpp
diff options
context:
space:
mode:
authorTom Ouyang <ouyang@google.com>2013-03-07 02:45:12 +0000
committerAndroid Git Automerger <android-git-automerger@android.com>2013-03-07 02:45:12 +0000
commit951272d24aa2ec188c1cdcfdbd1a2afc8edf2d3f (patch)
treec0ab85a44dc1de66a02cb16a642eeca51ba0675d /native/jni/src/proximity_info_state.cpp
parent41c471d93d117a65a4f241e588154d84709cf5d0 (diff)
parent2192d08b9cca6a40d834d6a5001d19b5845ed8a0 (diff)
downloadlatinime-951272d24aa2ec188c1cdcfdbd1a2afc8edf2d3f.tar.gz
latinime-951272d24aa2ec188c1cdcfdbd1a2afc8edf2d3f.tar.xz
latinime-951272d24aa2ec188c1cdcfdbd1a2afc8edf2d3f.zip
am 2192d08b: Remove unused scale parameter from getPointToKeyLength()
* commit '2192d08b9cca6a40d834d6a5001d19b5845ed8a0': Remove unused scale parameter from getPointToKeyLength()
Diffstat (limited to 'native/jni/src/proximity_info_state.cpp')
-rw-r--r--native/jni/src/proximity_info_state.cpp18
1 files changed, 4 insertions, 14 deletions
diff --git a/native/jni/src/proximity_info_state.cpp b/native/jni/src/proximity_info_state.cpp
index 00e7ffc6c..7ec3c5400 100644
--- a/native/jni/src/proximity_info_state.cpp
+++ b/native/jni/src/proximity_info_state.cpp
@@ -156,15 +156,14 @@ void ProximityInfoState::initInputParams(const int pointerId, const float maxPoi
}
}
-// TODO: Remove the "scale" parameter
// This function basically converts from a length to an edit distance. Accordingly, it's obviously
// wrong to compare with mMaxPointToKeyLength.
float ProximityInfoState::getPointToKeyLength(
- const int inputIndex, const int codePoint, const float scale) const {
+ const int inputIndex, const int codePoint) const {
const int keyId = mProximityInfo->getKeyIndexOf(codePoint);
if (keyId != NOT_AN_INDEX) {
const int index = inputIndex * mProximityInfo->getKeyCount() + keyId;
- return min(mSampledDistanceCache_G[index] * scale, mMaxPointToKeyLength);
+ return min(mSampledDistanceCache_G[index], mMaxPointToKeyLength);
}
if (isSkippableCodePoint(codePoint)) {
return 0.0f;
@@ -173,19 +172,10 @@ float ProximityInfoState::getPointToKeyLength(
return static_cast<float>(MAX_VALUE_FOR_WEIGHTING);
}
-float ProximityInfoState::getPointToKeyLength_G(const int inputIndex, const int codePoint) const {
- return getPointToKeyLength(inputIndex, codePoint, 1.0f);
-}
-
-// TODO: Remove the "scale" parameter
float ProximityInfoState::getPointToKeyByIdLength(
- const int inputIndex, const int keyId, const float scale) const {
+ const int inputIndex, const int keyId) const {
return ProximityInfoStateUtils::getPointToKeyByIdLength(mMaxPointToKeyLength,
- &mSampledDistanceCache_G, mProximityInfo->getKeyCount(), inputIndex, keyId, scale);
-}
-
-float ProximityInfoState::getPointToKeyByIdLength(const int inputIndex, const int keyId) const {
- return getPointToKeyByIdLength(inputIndex, keyId, 1.0f);
+ &mSampledDistanceCache_G, mProximityInfo->getKeyCount(), inputIndex, keyId);
}
// In the following function, c is the current character of the dictionary word currently examined.