am 306c7fb9: Merge "Misc cleanups"
# Via Android (Google) Code Review (1) and Ken Wakasa (1) * commit '306c7fb9b7d6fc4db91151c4dcfa3b3e07a3d28f': Misc cleanupsmain
commit
83f890b775
|
@ -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,
|
||||
|
|
|
@ -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);
|
||||
/////////////////////////////////////////
|
||||
|
|
|
@ -19,7 +19,6 @@
|
|||
|
||||
#include "defines.h"
|
||||
#include "proximity_info_params.h"
|
||||
#include "proximity_info_state.h"
|
||||
|
||||
namespace latinime {
|
||||
class SuggestUtils {
|
||||
|
|
|
@ -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);
|
||||
|
|
|
@ -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();
|
||||
|
|
Loading…
Reference in New Issue