mirror of
https://gitlab.futo.org/keyboard/latinime.git
synced 2024-09-28 14:54:30 +01:00
Merge "Fix variable type" into jb-mr1-dev
This commit is contained in:
commit
58bb1d7dd1
@ -113,7 +113,7 @@ int BigramDictionary::getBigrams(const int32_t *prevWord, int prevWordLength, in
|
|||||||
}
|
}
|
||||||
// If still no bigrams, we really don't have them!
|
// If still no bigrams, we really don't have them!
|
||||||
if (0 == pos) return 0;
|
if (0 == pos) return 0;
|
||||||
int bigramFlags;
|
uint8_t bigramFlags;
|
||||||
int bigramCount = 0;
|
int bigramCount = 0;
|
||||||
do {
|
do {
|
||||||
bigramFlags = BinaryFormat::getFlagsAndForwardPointer(root, &pos);
|
bigramFlags = BinaryFormat::getFlagsAndForwardPointer(root, &pos);
|
||||||
@ -153,7 +153,7 @@ int BigramDictionary::getBigramListPositionForWord(const int32_t *prevWord,
|
|||||||
forceLowerCaseSearch);
|
forceLowerCaseSearch);
|
||||||
|
|
||||||
if (NOT_VALID_WORD == pos) return 0;
|
if (NOT_VALID_WORD == pos) return 0;
|
||||||
const int flags = BinaryFormat::getFlagsAndForwardPointer(root, &pos);
|
const uint8_t flags = BinaryFormat::getFlagsAndForwardPointer(root, &pos);
|
||||||
if (0 == (flags & BinaryFormat::FLAG_HAS_BIGRAMS)) return 0;
|
if (0 == (flags & BinaryFormat::FLAG_HAS_BIGRAMS)) return 0;
|
||||||
if (0 == (flags & BinaryFormat::FLAG_HAS_MULTIPLE_CHARS)) {
|
if (0 == (flags & BinaryFormat::FLAG_HAS_MULTIPLE_CHARS)) {
|
||||||
BinaryFormat::getCodePointAndForwardPointer(root, &pos);
|
BinaryFormat::getCodePointAndForwardPointer(root, &pos);
|
||||||
@ -179,7 +179,7 @@ void BigramDictionary::fillBigramAddressToFrequencyMapAndFilter(const int32_t *p
|
|||||||
}
|
}
|
||||||
if (0 == pos) return;
|
if (0 == pos) return;
|
||||||
|
|
||||||
int bigramFlags;
|
uint8_t bigramFlags;
|
||||||
do {
|
do {
|
||||||
bigramFlags = BinaryFormat::getFlagsAndForwardPointer(root, &pos);
|
bigramFlags = BinaryFormat::getFlagsAndForwardPointer(root, &pos);
|
||||||
const int frequency = BinaryFormat::MASK_ATTRIBUTE_FREQUENCY & bigramFlags;
|
const int frequency = BinaryFormat::MASK_ATTRIBUTE_FREQUENCY & bigramFlags;
|
||||||
@ -215,7 +215,7 @@ bool BigramDictionary::isValidBigram(const int32_t *word1, int length1, const in
|
|||||||
int nextWordPos = BinaryFormat::getTerminalPosition(root, word2, length2,
|
int nextWordPos = BinaryFormat::getTerminalPosition(root, word2, length2,
|
||||||
false /* forceLowerCaseSearch */);
|
false /* forceLowerCaseSearch */);
|
||||||
if (NOT_VALID_WORD == nextWordPos) return false;
|
if (NOT_VALID_WORD == nextWordPos) return false;
|
||||||
int bigramFlags;
|
uint8_t bigramFlags;
|
||||||
do {
|
do {
|
||||||
bigramFlags = BinaryFormat::getFlagsAndForwardPointer(root, &pos);
|
bigramFlags = BinaryFormat::getFlagsAndForwardPointer(root, &pos);
|
||||||
const int bigramPos = BinaryFormat::getAttributeAddressAndForwardPointer(root, bigramFlags,
|
const int bigramPos = BinaryFormat::getAttributeAddressAndForwardPointer(root, bigramFlags,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user