mirror of
https://gitlab.futo.org/keyboard/latinime.git
synced 2024-09-28 14:54:30 +01:00
Merge "Remove unused variables"
This commit is contained in:
commit
fe0c000f40
@ -82,14 +82,12 @@ bool TerminalPositionLookupTable::flushToFile(const char *const dictPath) const
|
||||
}
|
||||
|
||||
bool TerminalPositionLookupTable::runGCTerminalIds(TerminalIdMap *const terminalIdMap) {
|
||||
int removedEntryCount = 0;
|
||||
int nextNewTerminalId = 0;
|
||||
for (int i = 0; i < mSize; ++i) {
|
||||
const int terminalPos = getBuffer()->readUint(
|
||||
Ver4DictConstants::TERMINAL_ADDRESS_TABLE_ADDRESS_SIZE, getEntryPos(i));
|
||||
if (terminalPos == Ver4DictConstants::NOT_A_TERMINAL_ADDRESS) {
|
||||
// This entry is a garbage.
|
||||
removedEntryCount++;
|
||||
} else {
|
||||
// Give a new terminal id to the entry.
|
||||
if (!getWritableBuffer()->writeUint(terminalPos,
|
||||
|
@ -71,14 +71,12 @@ bool TerminalPositionLookupTable::flushToFile(FILE *const file) const {
|
||||
}
|
||||
|
||||
bool TerminalPositionLookupTable::runGCTerminalIds(TerminalIdMap *const terminalIdMap) {
|
||||
int removedEntryCount = 0;
|
||||
int nextNewTerminalId = 0;
|
||||
for (int i = 0; i < mSize; ++i) {
|
||||
const int terminalPos = getBuffer()->readUint(
|
||||
Ver4DictConstants::TERMINAL_ADDRESS_TABLE_ADDRESS_SIZE, getEntryPos(i));
|
||||
if (terminalPos == Ver4DictConstants::NOT_A_TERMINAL_ADDRESS) {
|
||||
// This entry is a garbage.
|
||||
removedEntryCount++;
|
||||
} else {
|
||||
// Give a new terminal id to the entry.
|
||||
if (!getWritableBuffer()->writeUint(terminalPos,
|
||||
|
@ -53,7 +53,7 @@ void TrieMap::dump(const int from, const int to) const {
|
||||
for (int i = from; i < to; ++i) {
|
||||
AKLOGI("Entry[%d]: %x, %x", i, readField0(i), readField1(i));
|
||||
}
|
||||
int unusedRegionSize = 0;
|
||||
[[maybe_unused]] int unusedRegionSize = 0;
|
||||
for (int i = 1; i <= MAX_NUM_OF_ENTRIES_IN_ONE_LEVEL; ++i) {
|
||||
int index = readEmptyTableLink(i);
|
||||
while (index != ROOT_BITMAP_ENTRY_INDEX) {
|
||||
|
@ -490,12 +490,10 @@ namespace latinime {
|
||||
const int x0 = (*sampledInputXs)[id];
|
||||
const int y0 = (*sampledInputYs)[id];
|
||||
const int actualInputIndex = (*sampledInputIndices)[id];
|
||||
int tempTime = 0;
|
||||
int tempBeelineDistance = 0;
|
||||
int start = actualInputIndex;
|
||||
// lookup forward
|
||||
while (start > 0 && tempBeelineDistance < lookupRadius) {
|
||||
tempTime += times[start] - times[start - 1];
|
||||
--start;
|
||||
tempBeelineDistance = GeometryUtils::getDistanceInt(x0, y0, xCoordinates[start],
|
||||
yCoordinates[start]);
|
||||
@ -504,12 +502,10 @@ namespace latinime {
|
||||
if (start > 0 && start < actualInputIndex) {
|
||||
++start;
|
||||
}
|
||||
tempTime= 0;
|
||||
tempBeelineDistance = 0;
|
||||
int end = actualInputIndex;
|
||||
// lookup backward
|
||||
while (end < (inputSize - 1) && tempBeelineDistance < lookupRadius) {
|
||||
tempTime += times[end + 1] - times[end];
|
||||
++end;
|
||||
tempBeelineDistance = GeometryUtils::getDistanceInt(x0, y0, xCoordinates[end],
|
||||
yCoordinates[end]);
|
||||
|
@ -72,7 +72,7 @@ class ProximityInfoUtils {
|
||||
for (int i = 0; i < inputSize; ++i) {
|
||||
AKLOGI("---");
|
||||
for (int j = 0; j < MAX_PROXIMITY_CHARS_SIZE; ++j) {
|
||||
int proximityChar =
|
||||
[[maybe_unused]] int proximityChar =
|
||||
inputProximities[i * MAX_PROXIMITY_CHARS_SIZE + j];
|
||||
proximityChar += 0;
|
||||
AKLOGI("--- (%d)%c", i, proximityChar);
|
||||
|
@ -97,7 +97,7 @@ void SuggestionResults::dumpSuggestions() const {
|
||||
suggestedWords.push_back(copyOfSuggestedWords.top());
|
||||
copyOfSuggestedWords.pop();
|
||||
}
|
||||
int index = 0;
|
||||
[[maybe_unused]] int index = 0;
|
||||
for (auto it = suggestedWords.rbegin(); it != suggestedWords.rend(); ++it) {
|
||||
DUMP_SUGGESTION(it->getCodePoint(), it->getCodePointCount(), index, it->getScore());
|
||||
index++;
|
||||
|
Loading…
Reference in New Issue
Block a user