mirror of
https://gitlab.futo.org/keyboard/latinime.git
synced 2024-09-28 14:54:30 +01:00
Some more misc cleanups
Change-Id: I88cb6d38d73a2a68ade2f2190910f4733cd7b668
This commit is contained in:
parent
3d0477fbd2
commit
ca008d82d4
@ -112,7 +112,7 @@ void Correction::setCorrectionParams(const int skipPos, const int excessivePos,
|
||||
mMaxErrors = maxErrors;
|
||||
}
|
||||
|
||||
void Correction::checkState() {
|
||||
void Correction::checkState() const {
|
||||
if (DEBUG_DICT) {
|
||||
int inputCount = 0;
|
||||
if (mSkipPos >= 0) ++inputCount;
|
||||
@ -121,12 +121,12 @@ void Correction::checkState() {
|
||||
}
|
||||
}
|
||||
|
||||
bool Correction::sameAsTyped() {
|
||||
bool Correction::sameAsTyped() const {
|
||||
return mProximityInfoState.sameAsTyped(mWord, mOutputIndex);
|
||||
}
|
||||
|
||||
int Correction::getFreqForSplitMultipleWords(const int *freqArray, const int *wordLengthArray,
|
||||
const int wordCount, const bool isSpaceProximity, const int *word) {
|
||||
const int wordCount, const bool isSpaceProximity, const int *word) const {
|
||||
return Correction::RankingAlgorithm::calcFreqForSplitMultipleWords(freqArray, wordLengthArray,
|
||||
wordCount, this, isSpaceProximity, word);
|
||||
}
|
||||
|
@ -64,8 +64,8 @@ class Correction {
|
||||
void setCorrectionParams(const int skipPos, const int excessivePos, const int transposedPos,
|
||||
const int spaceProximityPos, const int missingSpacePos, const bool useFullEditDistance,
|
||||
const bool doAutoCompletion, const int maxErrors);
|
||||
void checkState();
|
||||
bool sameAsTyped();
|
||||
void checkState() const;
|
||||
bool sameAsTyped() const;
|
||||
bool initProcessState(const int index);
|
||||
|
||||
int getInputIndex() const;
|
||||
@ -77,7 +77,7 @@ class Correction {
|
||||
}
|
||||
|
||||
int getFreqForSplitMultipleWords(const int *freqArray, const int *wordLengthArray,
|
||||
const int wordCount, const bool isSpaceProximity, const int *word);
|
||||
const int wordCount, const bool isSpaceProximity, const int *word) const;
|
||||
int getFinalProbability(const int probability, int **word, int *wordLength);
|
||||
int getFinalProbabilityForSubQueue(const int probability, int **word, int *wordLength,
|
||||
const int inputSize);
|
||||
|
@ -87,7 +87,7 @@ class WordsPriorityQueue {
|
||||
}
|
||||
}
|
||||
|
||||
SuggestedWord *top() {
|
||||
SuggestedWord *top() const {
|
||||
if (mSuggestions.empty()) return 0;
|
||||
SuggestedWord *sw = mSuggestions.top();
|
||||
return sw;
|
||||
|
Loading…
Reference in New Issue
Block a user