Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit b4a983d4 authored by Keisuke Kuroyanagi's avatar Keisuke Kuroyanagi Committed by Android (Google) Code Review
Browse files

Merge "Remove DicNode.isFirstWord()."

parents 5feda45a 90f64118
Loading
Loading
Loading
Loading
+3 −5
Original line number Diff line number Diff line
@@ -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());
    }