aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKen Wakasa <kwakasa@google.com>2012-09-27 03:50:38 -0700
committerAndroid Git Automerger <android-git-automerger@android.com>2012-09-27 03:50:38 -0700
commit4e679a6e185c7cef056b9c5d4bde239be341b6a1 (patch)
treef1e9c4f4495d3805709a42a968cb70256ded211f
parent337274a01558b40135ecb1de0b4fe2b67c607958 (diff)
parent94bc0d49f82f9d3c62fe04519da55fd963db93ef (diff)
downloadlatinime-4e679a6e185c7cef056b9c5d4bde239be341b6a1.tar.gz
latinime-4e679a6e185c7cef056b9c5d4bde239be341b6a1.tar.xz
latinime-4e679a6e185c7cef056b9c5d4bde239be341b6a1.zip
am 94bc0d49: am 6e5c2db5: Merge "Cleanups in LatinIME native source code" into jb-mr1-dev
* commit '94bc0d49f82f9d3c62fe04519da55fd963db93ef': Cleanups in LatinIME native source code
-rw-r--r--native/jni/src/char_utils.h6
-rw-r--r--native/jni/src/defines.h3
-rw-r--r--native/jni/src/geometry_utils.h4
-rw-r--r--native/jni/src/proximity_info.h5
4 files changed, 9 insertions, 9 deletions
diff --git a/native/jni/src/char_utils.h b/native/jni/src/char_utils.h
index 20cf2e8b5..9008e364c 100644
--- a/native/jni/src/char_utils.h
+++ b/native/jni/src/char_utils.h
@@ -67,5 +67,11 @@ inline static unsigned short toLowerCase(const unsigned short c) {
inline static unsigned short toBaseLowerCase(const unsigned short c) {
return toLowerCase(toBaseChar(c));
}
+
+inline static bool isSkippableChar(const uint16_t character) {
+ // TODO: Do not hardcode here
+ return character == '\'' || character == '-';
+}
+
} // namespace latinime
#endif // LATINIME_CHAR_UTILS_H
diff --git a/native/jni/src/defines.h b/native/jni/src/defines.h
index ad526fb7f..ea0f0ef70 100644
--- a/native/jni/src/defines.h
+++ b/native/jni/src/defines.h
@@ -368,6 +368,9 @@ static inline void prof_out(void) {
#define MIN_USER_TYPED_LENGTH_FOR_MULTIPLE_WORD_SUGGESTION 3
#define MIN_USER_TYPED_LENGTH_FOR_EXCESSIVE_CHARACTER_SUGGESTION 3
+// TODO: Remove
+#define MAX_POINTER_COUNT_FOR_G 2
+
// Size, in bytes, of the bloom filter index for bigrams
// 128 gives us 1024 buckets. The probability of false positive is (1 - e ** (-kn/m))**k,
// where k is the number of hash functions, n the number of bigrams, and m the number of
diff --git a/native/jni/src/geometry_utils.h b/native/jni/src/geometry_utils.h
index 3892b46a0..31359e19d 100644
--- a/native/jni/src/geometry_utils.h
+++ b/native/jni/src/geometry_utils.h
@@ -19,15 +19,11 @@
#include <cmath>
-#define MAX_PATHS 2
-
#define DEBUG_DECODER false
#define M_PI_F 3.14159265f
-
#define ROUND_FLOAT_10000(f) ((f) < 1000.0f && (f) > 0.001f) \
? (floorf((f) * 10000.0f) / 10000.0f) : (f)
-
#define SQUARE_FLOAT(x) ((x) * (x))
namespace latinime {
diff --git a/native/jni/src/proximity_info.h b/native/jni/src/proximity_info.h
index 2947f9ba6..70942aa19 100644
--- a/native/jni/src/proximity_info.h
+++ b/native/jni/src/proximity_info.h
@@ -27,11 +27,6 @@ namespace latinime {
class Correction;
-inline bool isSkippableChar(const uint16_t character) {
- // TODO: Do not hardcode here
- return character == '\'' || character == '-';
-}
-
class ProximityInfo {
public:
ProximityInfo(JNIEnv *env, const jstring localeJStr, const int maxProximityCharsSize,