Merge "Code cleanup."

main
Keisuke Kuroyanagi 2014-05-13 03:06:20 +00:00 committed by Android (Google) Code Review
commit 6d132aa09f
4 changed files with 4 additions and 4 deletions

View File

@ -226,7 +226,7 @@ int ProximityInfo::getKeyCenterXOfKeyIdG(
// When the referencePointY is NOT_A_COORDINATE, this method calculates the return value without // When the referencePointY is NOT_A_COORDINATE, this method calculates the return value without
// using the line segment. // using the line segment.
int ProximityInfo::getKeyCenterYOfKeyIdG( int ProximityInfo::getKeyCenterYOfKeyIdG(
const int keyId, const int referencePointY, const bool isGeometric) const { const int keyId, const int referencePointY, const bool isGeometric) const {
// TODO: Remove "isGeometric" and have separate "proximity_info"s for gesture and typing. // TODO: Remove "isGeometric" and have separate "proximity_info"s for gesture and typing.
if (keyId < 0) { if (keyId < 0) {
return 0; return 0;

View File

@ -56,7 +56,7 @@ class ProximityInfoStateUtils {
const std::vector<int> *const sampledLengthCache, const std::vector<int> *const sampledLengthCache,
const std::vector<int> *const sampledInputIndice, const std::vector<int> *const sampledInputIndice,
std::vector<float> *sampledSpeedRates, std::vector<float> *sampledDirections); std::vector<float> *sampledSpeedRates, std::vector<float> *sampledDirections);
static void refreshBeelineSpeedRates(const int mostCommonKeyWidth, const float averageSpeed, static void refreshBeelineSpeedRates(const int mostCommonKeyWidth, const float averageSpeed,
const int inputSize, const int *const xCoordinates, const int *const yCoordinates, const int inputSize, const int *const xCoordinates, const int *const yCoordinates,
const int *times, const int sampledInputSize, const int *times, const int sampledInputSize,
const std::vector<int> *const sampledInputXs, const std::vector<int> *const sampledInputXs,

View File

@ -44,7 +44,7 @@ const int ShortcutListReadingUtils::WHITELIST_SHORTCUT_PROBABILITY = 15;
} }
/* static */ int ShortcutListReadingUtils::readShortcutTarget( /* static */ int ShortcutListReadingUtils::readShortcutTarget(
const uint8_t *const dictRoot, const int maxLength, int *const outWord, int *const pos) { const uint8_t *const dictRoot, const int maxLength, int *const outWord, int *const pos) {
return ByteArrayUtils::readStringAndAdvancePosition(dictRoot, maxLength, outWord, pos); return ByteArrayUtils::readStringAndAdvancePosition(dictRoot, maxLength, outWord, pos);
} }

View File

@ -76,7 +76,7 @@ bool Ver4PatriciaTrieNodeWriter::markPtNodeAsMoved(
PatriciaTrieReadingUtils::getFlagsAndAdvancePosition(dictBuf, &pos); PatriciaTrieReadingUtils::getFlagsAndAdvancePosition(dictBuf, &pos);
const PatriciaTrieReadingUtils::NodeFlags updatedFlags = const PatriciaTrieReadingUtils::NodeFlags updatedFlags =
DynamicPtReadingUtils::updateAndGetFlags(originalFlags, true /* isMoved */, DynamicPtReadingUtils::updateAndGetFlags(originalFlags, true /* isMoved */,
false /* isDeleted */, false /* willBecomeNonTerminal */); false /* isDeleted */, false /* willBecomeNonTerminal */);
int writingPos = toBeUpdatedPtNodeParams->getHeadPos(); int writingPos = toBeUpdatedPtNodeParams->getHeadPos();
// Update flags. // Update flags.
if (!DynamicPtWritingUtils::writeFlagsAndAdvancePosition(mTrieBuffer, updatedFlags, if (!DynamicPtWritingUtils::writeFlagsAndAdvancePosition(mTrieBuffer, updatedFlags,