Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 306c7fb9 authored by Ken Wakasa's avatar Ken Wakasa Committed by Android (Google) Code Review
Browse files

Merge "Misc cleanups"

parents 83f173cc e599d7e3
Loading
Loading
Loading
Loading
+0 −2
Original line number Diff line number Diff line
@@ -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,
+1 −3
Original line number Diff line number Diff line
@@ -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);
    /////////////////////////////////////////
+0 −1
Original line number Diff line number Diff line
@@ -19,7 +19,6 @@

#include "defines.h"
#include "proximity_info_params.h"
#include "proximity_info_state.h"

namespace latinime {
class SuggestUtils {
+3 −3
Original line number Diff line number Diff line
@@ -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);
+3 −3
Original line number Diff line number Diff line
@@ -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();