aboutsummaryrefslogtreecommitdiffstats
path: root/native/jni/src
diff options
context:
space:
mode:
authorKeisuke Kuroyanagi <ksk@google.com>2014-03-27 08:41:26 +0000
committerAndroid Git Automerger <android-git-automerger@android.com>2014-03-27 08:41:26 +0000
commit65e88e14ee103abb5d1be217f2e1003f486f1d63 (patch)
treec31a69e5619deacb068946eca734b42493c596e9 /native/jni/src
parente769c13af4393a335ce9d91e2c9b11631a523149 (diff)
parentb4a983d400fdb6e86694a594361895aef3e9c497 (diff)
downloadlatinime-65e88e14ee103abb5d1be217f2e1003f486f1d63.tar.gz
latinime-65e88e14ee103abb5d1be217f2e1003f486f1d63.tar.xz
latinime-65e88e14ee103abb5d1be217f2e1003f486f1d63.zip
am b4a983d4: Merge "Remove DicNode.isFirstWord()."
* commit 'b4a983d400fdb6e86694a594361895aef3e9c497': Remove DicNode.isFirstWord().
Diffstat (limited to 'native/jni/src')
-rw-r--r--native/jni/src/suggest/core/dicnode/dic_node.h8
1 files changed, 3 insertions, 5 deletions
diff --git a/native/jni/src/suggest/core/dicnode/dic_node.h b/native/jni/src/suggest/core/dicnode/dic_node.h
index 865aab632..3118cdfa3 100644
--- a/native/jni/src/suggest/core/dicnode/dic_node.h
+++ b/native/jni/src/suggest/core/dicnode/dic_node.h
@@ -218,10 +218,6 @@ class DicNode {
return CharUtils::isAsciiUpper(c);
}
- bool isFirstWord() const {
- return mDicNodeProperties.getPrevWordTerminalPtNodePos() == NOT_A_DICT_POS;
- }
-
bool isCompletion(const int inputSize) const {
return mDicNodeState.mDicNodeStateInput.getInputIndex(0) >= inputSize;
}
@@ -292,7 +288,9 @@ class DicNode {
// the one that corresponds to the last word of the suggestion, and all the previous words
// are concatenated together in mDicNodeStateOutput.
int getTotalNodeSpaceCount() const {
- if (isFirstWord()) return 0;
+ if (!hasMultipleWords()) {
+ return 0;
+ }
return CharUtils::getSpaceCount(mDicNodeState.mDicNodeStateOutput.getCodePointBuf(),
mDicNodeState.mDicNodeStateOutput.getPrevWordsLength());
}