mirror of
https://gitlab.futo.org/keyboard/latinime.git
synced 2024-09-28 14:54:30 +01:00
Code cleanup.
Change-Id: Ic31b66cccfd77348f2ff7961959a3eaf9f7ad5d8
This commit is contained in:
parent
0befbf8289
commit
d0d0113983
@ -226,7 +226,7 @@ int ProximityInfo::getKeyCenterXOfKeyIdG(
|
||||
// When the referencePointY is NOT_A_COORDINATE, this method calculates the return value without
|
||||
// using the line segment.
|
||||
int ProximityInfo::getKeyCenterYOfKeyIdG(
|
||||
const int keyId, const int referencePointY, const bool isGeometric) const {
|
||||
const int keyId, const int referencePointY, const bool isGeometric) const {
|
||||
// TODO: Remove "isGeometric" and have separate "proximity_info"s for gesture and typing.
|
||||
if (keyId < 0) {
|
||||
return 0;
|
||||
|
@ -56,7 +56,7 @@ class ProximityInfoStateUtils {
|
||||
const std::vector<int> *const sampledLengthCache,
|
||||
const std::vector<int> *const sampledInputIndice,
|
||||
std::vector<float> *sampledSpeedRates, std::vector<float> *sampledDirections);
|
||||
static void refreshBeelineSpeedRates(const int mostCommonKeyWidth, const float averageSpeed,
|
||||
static void refreshBeelineSpeedRates(const int mostCommonKeyWidth, const float averageSpeed,
|
||||
const int inputSize, const int *const xCoordinates, const int *const yCoordinates,
|
||||
const int *times, const int sampledInputSize,
|
||||
const std::vector<int> *const sampledInputXs,
|
||||
|
@ -44,7 +44,7 @@ const int ShortcutListReadingUtils::WHITELIST_SHORTCUT_PROBABILITY = 15;
|
||||
}
|
||||
|
||||
/* static */ int ShortcutListReadingUtils::readShortcutTarget(
|
||||
const uint8_t *const dictRoot, const int maxLength, int *const outWord, int *const pos) {
|
||||
const uint8_t *const dictRoot, const int maxLength, int *const outWord, int *const pos) {
|
||||
return ByteArrayUtils::readStringAndAdvancePosition(dictRoot, maxLength, outWord, pos);
|
||||
}
|
||||
|
||||
|
@ -76,7 +76,7 @@ bool Ver4PatriciaTrieNodeWriter::markPtNodeAsMoved(
|
||||
PatriciaTrieReadingUtils::getFlagsAndAdvancePosition(dictBuf, &pos);
|
||||
const PatriciaTrieReadingUtils::NodeFlags updatedFlags =
|
||||
DynamicPtReadingUtils::updateAndGetFlags(originalFlags, true /* isMoved */,
|
||||
false /* isDeleted */, false /* willBecomeNonTerminal */);
|
||||
false /* isDeleted */, false /* willBecomeNonTerminal */);
|
||||
int writingPos = toBeUpdatedPtNodeParams->getHeadPos();
|
||||
// Update flags.
|
||||
if (!DynamicPtWritingUtils::writeFlagsAndAdvancePosition(mTrieBuffer, updatedFlags,
|
||||
|
Loading…
Reference in New Issue
Block a user