Merge "Fix a typo"
commit
2b5b6388d6
|
@ -171,7 +171,7 @@ static inline void prof_out(void) {
|
||||||
#define EQUIVALENT_CHAR_WITHOUT_DISTANCE_INFO -2
|
#define EQUIVALENT_CHAR_WITHOUT_DISTANCE_INFO -2
|
||||||
#define PROXIMITY_CHAR_WITHOUT_DISTANCE_INFO -3
|
#define PROXIMITY_CHAR_WITHOUT_DISTANCE_INFO -3
|
||||||
#define ADDITIONAL_PROXIMITY_CHAR_DISTANCE_INFO -4
|
#define ADDITIONAL_PROXIMITY_CHAR_DISTANCE_INFO -4
|
||||||
#define NOT_A_INDEX -1
|
#define NOT_AN_INDEX -1
|
||||||
#define NOT_A_FREQUENCY -1
|
#define NOT_A_FREQUENCY -1
|
||||||
|
|
||||||
#define KEYCODE_SPACE ' '
|
#define KEYCODE_SPACE ' '
|
||||||
|
|
|
@ -304,7 +304,7 @@ inline float square(const float x) { return x * x; }
|
||||||
|
|
||||||
float ProximityInfo::calculateNormalizedSquaredDistance(
|
float ProximityInfo::calculateNormalizedSquaredDistance(
|
||||||
const int keyIndex, const int inputIndex) const {
|
const int keyIndex, const int inputIndex) const {
|
||||||
if (keyIndex == NOT_A_INDEX) {
|
if (keyIndex == NOT_AN_INDEX) {
|
||||||
return NOT_A_DISTANCE_FLOAT;
|
return NOT_A_DISTANCE_FLOAT;
|
||||||
}
|
}
|
||||||
if (!hasSweetSpotData(keyIndex)) {
|
if (!hasSweetSpotData(keyIndex)) {
|
||||||
|
@ -325,11 +325,11 @@ bool ProximityInfo::hasInputCoordinates() const {
|
||||||
int ProximityInfo::getKeyIndex(const int c) const {
|
int ProximityInfo::getKeyIndex(const int c) const {
|
||||||
if (KEY_COUNT == 0) {
|
if (KEY_COUNT == 0) {
|
||||||
// We do not have the coordinate data
|
// We do not have the coordinate data
|
||||||
return NOT_A_INDEX;
|
return NOT_AN_INDEX;
|
||||||
}
|
}
|
||||||
const unsigned short baseLowerC = toBaseLowerCase(c);
|
const unsigned short baseLowerC = toBaseLowerCase(c);
|
||||||
if (baseLowerC > MAX_CHAR_CODE) {
|
if (baseLowerC > MAX_CHAR_CODE) {
|
||||||
return NOT_A_INDEX;
|
return NOT_AN_INDEX;
|
||||||
}
|
}
|
||||||
return mCodeToKeyIndex[baseLowerC];
|
return mCodeToKeyIndex[baseLowerC];
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue