am 306c7fb9: Merge "Misc cleanups"

# Via Android (Google) Code Review (1) and Ken Wakasa (1)
* commit '306c7fb9b7d6fc4db91151c4dcfa3b3e07a3d28f':
  Misc cleanups
main
Ken Wakasa 2013-01-29 02:25:11 -08:00 committed by Android Git Automerger
commit 83f890b775
5 changed files with 7 additions and 12 deletions

View File

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

View File

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

View File

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

View File

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

View File

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