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

Commit e85b5bed authored by Jean Chalard's avatar Jean Chalard Committed by Android (Google) Code Review
Browse files

Merge "Skip shortcut targets if any. (A1)"

parents 0fe45eac e0e33969
Loading
Loading
Loading
Loading
+7 −7
Original line number Diff line number Diff line
@@ -145,15 +145,15 @@ inline int BinaryFormat::skipFrequency(const uint8_t flags, const int pos) {

inline int BinaryFormat::skipAllAttributes(const uint8_t* const dict, const uint8_t flags,
        const int pos) {
    // This function skips all attributes. The format makes provision for future extension
    // with other attributes (notably shortcuts) but for the time being, bigrams are the
    // only attributes that may be found in a character group, so we only look at bigrams
    // in this version.
    // This function skips all attributes: shortcuts and bigrams.
    int newPos = pos;
    if (UnigramDictionary::FLAG_HAS_SHORTCUT_TARGETS & flags) {
        newPos = skipAttributes(dict, newPos);
    }
    if (UnigramDictionary::FLAG_HAS_BIGRAMS & flags) {
        return skipAttributes(dict, pos);
    } else {
        return pos;
        newPos = skipAttributes(dict, newPos);
    }
    return newPos;
}

inline int BinaryFormat::skipChildrenPosAndAttributes(const uint8_t* const dict,