am e85b5bed: Merge "Skip shortcut targets if any. (A1)"
* commit 'e85b5bed57f4086f45bce53f27f959277afe3f0c': Skip shortcut targets if any. (A1)main
commit
f2a12e5ad3
|
@ -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,
|
inline int BinaryFormat::skipAllAttributes(const uint8_t* const dict, const uint8_t flags,
|
||||||
const int pos) {
|
const int pos) {
|
||||||
// This function skips all attributes. The format makes provision for future extension
|
// This function skips all attributes: shortcuts and bigrams.
|
||||||
// with other attributes (notably shortcuts) but for the time being, bigrams are the
|
int newPos = pos;
|
||||||
// only attributes that may be found in a character group, so we only look at bigrams
|
if (UnigramDictionary::FLAG_HAS_SHORTCUT_TARGETS & flags) {
|
||||||
// in this version.
|
newPos = skipAttributes(dict, newPos);
|
||||||
if (UnigramDictionary::FLAG_HAS_BIGRAMS & flags) {
|
|
||||||
return skipAttributes(dict, pos);
|
|
||||||
} else {
|
|
||||||
return pos;
|
|
||||||
}
|
}
|
||||||
|
if (UnigramDictionary::FLAG_HAS_BIGRAMS & flags) {
|
||||||
|
newPos = skipAttributes(dict, newPos);
|
||||||
|
}
|
||||||
|
return newPos;
|
||||||
}
|
}
|
||||||
|
|
||||||
inline int BinaryFormat::skipChildrenPosAndAttributes(const uint8_t* const dict,
|
inline int BinaryFormat::skipChildrenPosAndAttributes(const uint8_t* const dict,
|
||||||
|
|
Loading…
Reference in New Issue