diff options
author | 2011-12-16 01:44:15 -0800 | |
---|---|---|
committer | 2011-12-16 01:44:15 -0800 | |
commit | d3bf7ac12fc4680dbed15ad51caf7165fc015241 (patch) | |
tree | e6da4ed97c6dcc476a946f91f6f03b90347411a9 /native/src/proximity_info.cpp | |
parent | 1ba17f97d51ad34e6d8015a22d6bc6afd3eeb321 (diff) | |
parent | 744dab691e45ff8c5ca9745ee673f50060bcb7a9 (diff) | |
download | latinime-d3bf7ac12fc4680dbed15ad51caf7165fc015241.tar.gz latinime-d3bf7ac12fc4680dbed15ad51caf7165fc015241.tar.xz latinime-d3bf7ac12fc4680dbed15ad51caf7165fc015241.zip |
Merge "Prepare for proximity + two words suggestion"
Diffstat (limited to 'native/src/proximity_info.cpp')
-rw-r--r-- | native/src/proximity_info.cpp | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/native/src/proximity_info.cpp b/native/src/proximity_info.cpp index 6857caf00..6e26da276 100644 --- a/native/src/proximity_info.cpp +++ b/native/src/proximity_info.cpp @@ -100,9 +100,17 @@ inline int ProximityInfo::getStartIndexFromCoordinates(const int x, const int y) } bool ProximityInfo::hasSpaceProximity(const int x, const int y) const { + if (x < 0 || y < 0) { + if (DEBUG_DICT) { + LOGI("HasSpaceProximity: Illegal coordinates (%d, %d)", x, y); + assert(true); + } + return false; + } + const int startIndex = getStartIndexFromCoordinates(x, y); if (DEBUG_PROXIMITY_INFO) { - LOGI("hasSpaceProximity: index %d", startIndex); + LOGI("hasSpaceProximity: index %d, %d, %d", startIndex, x, y); } for (int i = 0; i < MAX_PROXIMITY_CHARS_SIZE; ++i) { if (DEBUG_PROXIMITY_INFO) { |