aboutsummaryrefslogtreecommitdiffstats
path: root/native/jni/src/defines.h
diff options
context:
space:
mode:
Diffstat (limited to 'native/jni/src/defines.h')
-rw-r--r--native/jni/src/defines.h6
1 files changed, 4 insertions, 2 deletions
diff --git a/native/jni/src/defines.h b/native/jni/src/defines.h
index ea0f0ef70..1bb031312 100644
--- a/native/jni/src/defines.h
+++ b/native/jni/src/defines.h
@@ -344,8 +344,8 @@ static inline void prof_out(void) {
#define MULTIPLE_WORDS_DEMOTION_RATE 80
#define MIN_INPUT_LENGTH_FOR_THREE_OR_MORE_WORDS_CORRECTION 6
-#define TWO_WORDS_CORRECTION_WITH_OTHER_ERROR_THRESHOLD 0.35
-#define START_TWO_WORDS_CORRECTION_THRESHOLD 0.185
+#define TWO_WORDS_CORRECTION_WITH_OTHER_ERROR_THRESHOLD 0.35f
+#define START_TWO_WORDS_CORRECTION_THRESHOLD 0.185f
/* heuristic... This should be changed if we change the unit of the frequency. */
#define SUPPRESS_SHORT_MULTIPLE_WORDS_THRESHOLD_FREQ (MAX_FREQ * 58 / 100)
@@ -392,6 +392,8 @@ static inline void prof_out(void) {
template<typename T> inline T min(T a, T b) { return a < b ? a : b; }
template<typename T> inline T max(T a, T b) { return a > b ? a : b; }
+#define NELEMS(x) (sizeof(x) / sizeof((x)[0]))
+
// The ratio of neutral area radius to sweet spot radius.
#define NEUTRAL_AREA_RADIUS_RATIO 1.3f