Remove DicNode.isFirstWord().
Change-Id: I825c0f7cf1fcf66c6309e0bab8e0fdd767170107
diff --git a/native/jni/src/suggest/core/dicnode/dic_node.h b/native/jni/src/suggest/core/dicnode/dic_node.h
index 865aab6..3118cdf 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 @@
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 @@
// 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());
}