Misc cleanups

Change-Id: Ie4f03f082097f913056308f02c6e15d5b11f84e8
main
Ken Wakasa 2013-01-29 19:20:04 +09:00
parent f6aed4bdd2
commit e599d7e317
5 changed files with 7 additions and 12 deletions

View File

@ -27,8 +27,6 @@
namespace latinime {
const int ProximityInfoState::NOT_A_CODE = -1;
void ProximityInfoState::initInputParams(const int pointerId, const float maxPointToKeyLength,
const ProximityInfo *proximityInfo, const int *const inputCodes, const int inputSize,
const int *const xCoordinates, const int *const yCoordinates, const int *const times,

View File

@ -32,9 +32,6 @@ class ProximityInfo;
class ProximityInfoState {
public:
static const int NOT_A_CODE;
/////////////////////////////////////////
// Defined in proximity_info_state.cpp //
/////////////////////////////////////////
@ -196,6 +193,7 @@ class ProximityInfoState {
const int from, const int to, const int keyId, const bool extend) const;
bool isKeyInSerchKeysAfterIndex(const int index, const int keyId) const;
private:
DISALLOW_COPY_AND_ASSIGN(ProximityInfoState);
/////////////////////////////////////////

View File

@ -19,7 +19,6 @@
#include "defines.h"
#include "proximity_info_params.h"
#include "proximity_info_state.h"
namespace latinime {
class SuggestUtils {

View File

@ -110,7 +110,7 @@ class WordsPriorityQueue {
}
}
AK_FORCE_INLINE void dumpTopWord() {
AK_FORCE_INLINE void dumpTopWord() const {
if (size() <= 0) {
return;
}
@ -118,7 +118,7 @@ class WordsPriorityQueue {
}
AK_FORCE_INLINE float getHighestNormalizedScore(const int *before, const int beforeLength,
int **outWord, int *outScore, int *outLength) {
int **outWord, int *outScore, int *outLength) const {
if (!mHighestSuggestedWord) {
return 0.0f;
}
@ -137,7 +137,7 @@ class WordsPriorityQueue {
}
};
SuggestedWord *getFreeSuggestedWord(int score, int *word, int wordLength, int type) {
SuggestedWord *getFreeSuggestedWord(int score, int *word, int wordLength, int type) const {
for (int i = 0; i < MAX_WORD_LENGTH; ++i) {
if (!mSuggestedWords[i].mUsed) {
mSuggestedWords[i].setParams(score, word, wordLength, type);

View File

@ -44,11 +44,11 @@ class WordsPriorityQueuePool {
}
}
WordsPriorityQueue *getMasterQueue() {
WordsPriorityQueue *getMasterQueue() const {
return mMasterQueue;
}
WordsPriorityQueue *getSubQueue(const int wordIndex, const int inputWordLength) {
WordsPriorityQueue *getSubQueue(const int wordIndex, const int inputWordLength) const {
if (wordIndex >= MULTIPLE_WORDS_SUGGESTION_MAX_WORDS) {
return 0;
}
@ -77,7 +77,7 @@ class WordsPriorityQueuePool {
}
}
void dumpSubQueue1TopSuggestions() {
void dumpSubQueue1TopSuggestions() const {
AKLOGI("DUMP SUBQUEUE1 TOP SUGGESTIONS");
for (int i = 0; i < SUB_QUEUE_MAX_COUNT; ++i) {
getSubQueue(0, i)->dumpTopWord();