am 2834f522: Merge "Prep for GCC 4.6 that will be used in unbundled branches"
# Via Android (Google) Code Review (1) and Ken Wakasa (1) * commit '2834f522b78d57ee862c5444e389a3834ba6de63': Prep for GCC 4.6 that will be used in unbundled branchesmain
commit
18cd7011f7
|
@ -70,15 +70,16 @@ class ProximityInfo {
|
||||||
int getKeyCenterYOfKeyIdG(int keyId) const;
|
int getKeyCenterYOfKeyIdG(int keyId) const;
|
||||||
int getKeyKeyDistanceG(int keyId0, int keyId1) const;
|
int getKeyKeyDistanceG(int keyId0, int keyId1) const;
|
||||||
|
|
||||||
void initializeProximities(const int *const inputCodes, const int *const inputXCoordinates,
|
void AK_FORCE_INLINE initializeProximities(const int *const inputCodes,
|
||||||
const int *const inputYCoordinates, const int inputSize, int *allInputCodes) const {
|
const int *const inputXCoordinates, const int *const inputYCoordinates,
|
||||||
|
const int inputSize, int *allInputCodes) const {
|
||||||
ProximityInfoUtils::initializeProximities(inputCodes, inputXCoordinates, inputYCoordinates,
|
ProximityInfoUtils::initializeProximities(inputCodes, inputXCoordinates, inputYCoordinates,
|
||||||
inputSize, mKeyXCoordinates, mKeyYCoordinates, mKeyWidths, mKeyHeights,
|
inputSize, mKeyXCoordinates, mKeyYCoordinates, mKeyWidths, mKeyHeights,
|
||||||
mProximityCharsArray, CELL_HEIGHT, CELL_WIDTH, GRID_WIDTH, MOST_COMMON_KEY_WIDTH,
|
mProximityCharsArray, CELL_HEIGHT, CELL_WIDTH, GRID_WIDTH, MOST_COMMON_KEY_WIDTH,
|
||||||
KEY_COUNT, mLocaleStr, &mCodeToKeyMap, allInputCodes);
|
KEY_COUNT, mLocaleStr, &mCodeToKeyMap, allInputCodes);
|
||||||
}
|
}
|
||||||
|
|
||||||
int getKeyIndexOf(const int c) const {
|
int AK_FORCE_INLINE getKeyIndexOf(const int c) const {
|
||||||
return ProximityInfoUtils::getKeyIndexOf(KEY_COUNT, c, &mCodeToKeyMap);
|
return ProximityInfoUtils::getKeyIndexOf(KEY_COUNT, c, &mCodeToKeyMap);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -28,7 +28,7 @@
|
||||||
namespace latinime {
|
namespace latinime {
|
||||||
class ProximityInfoUtils {
|
class ProximityInfoUtils {
|
||||||
public:
|
public:
|
||||||
static int getKeyIndexOf(const int keyCount, const int c,
|
static AK_FORCE_INLINE int getKeyIndexOf(const int keyCount, const int c,
|
||||||
const hash_map_compat<int, int> *const codeToKeyMap) {
|
const hash_map_compat<int, int> *const codeToKeyMap) {
|
||||||
if (keyCount == 0) {
|
if (keyCount == 0) {
|
||||||
// We do not have the coordinate data
|
// We do not have the coordinate data
|
||||||
|
@ -45,7 +45,7 @@ class ProximityInfoUtils {
|
||||||
return NOT_AN_INDEX;
|
return NOT_AN_INDEX;
|
||||||
}
|
}
|
||||||
|
|
||||||
static void initializeProximities(const int *const inputCodes,
|
static AK_FORCE_INLINE void initializeProximities(const int *const inputCodes,
|
||||||
const int *const inputXCoordinates, const int *const inputYCoordinates,
|
const int *const inputXCoordinates, const int *const inputYCoordinates,
|
||||||
const int inputSize, const int *const keyXCoordinates,
|
const int inputSize, const int *const keyXCoordinates,
|
||||||
const int *const keyYCoordinates, const int *const keyWidths, const int *keyHeights,
|
const int *const keyYCoordinates, const int *const keyWidths, const int *keyHeights,
|
||||||
|
@ -151,7 +151,7 @@ class ProximityInfoUtils {
|
||||||
return left < right && top < bottom && x >= left && x < right && y >= top && y < bottom;
|
return left < right && top < bottom && x >= left && x < right && y >= top && y < bottom;
|
||||||
}
|
}
|
||||||
|
|
||||||
static void calculateProximities(const int *const keyXCoordinates,
|
static AK_FORCE_INLINE void calculateProximities(const int *const keyXCoordinates,
|
||||||
const int *const keyYCoordinates, const int *const keyWidths, const int *keyHeights,
|
const int *const keyYCoordinates, const int *const keyWidths, const int *keyHeights,
|
||||||
const int *const proximityCharsArray, const int cellHeight, const int cellWidth,
|
const int *const proximityCharsArray, const int cellHeight, const int cellWidth,
|
||||||
const int gridWidth, const int mostCommonKeyWidth, const int keyCount,
|
const int gridWidth, const int mostCommonKeyWidth, const int keyCount,
|
||||||
|
|
Loading…
Reference in New Issue