am ca008d82: Some more misc cleanups

# Via Ken Wakasa
* commit 'ca008d82d41fab63ef967cc5f2ac35066331d5c8':
  Some more misc cleanups
main
Ken Wakasa 2013-01-29 03:32:52 -08:00 committed by Android Git Automerger
commit 82c07274a0
3 changed files with 7 additions and 7 deletions

View File

@ -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);
}

View File

@ -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);

View File

@ -87,7 +87,7 @@ class WordsPriorityQueue {
}
}
SuggestedWord *top() {
SuggestedWord *top() const {
if (mSuggestions.empty()) return 0;
SuggestedWord *sw = mSuggestions.top();
return sw;