Small cleanups

Change-Id: I29b4dee15d66f8f1372035738658234395001d41
diff --git a/native/jni/src/correction.cpp b/native/jni/src/correction.cpp
index 50f33fe..46ca911 100644
--- a/native/jni/src/correction.cpp
+++ b/native/jni/src/correction.cpp
@@ -14,11 +14,6 @@
  * limitations under the License.
  */
 
-#include <cassert>
-#include <cctype>
-#include <cmath>
-#include <cstring>
-
 #define LOG_TAG "LatinIME: correction.cpp"
 
 #include "char_utils.h"
@@ -1002,7 +997,7 @@
 float Correction::RankingAlgorithm::calcNormalizedScore(const int *before, const int beforeLength,
         const int *after, const int afterLength, const int score) {
     if (0 == beforeLength || 0 == afterLength) {
-        return 0;
+        return 0.0f;
     }
     const int distance = editDistance(before, beforeLength, after, afterLength);
     int spaceCount = 0;
@@ -1013,7 +1008,7 @@
     }
 
     if (spaceCount == afterLength) {
-        return 0;
+        return 0.0f;
     }
 
     const float maxScore = score >= S_INT_MAX ? static_cast<float>(S_INT_MAX)
diff --git a/native/jni/src/correction.h b/native/jni/src/correction.h
index 912cd83..4184c64 100644
--- a/native/jni/src/correction.h
+++ b/native/jni/src/correction.h
@@ -19,7 +19,6 @@
 
 #include <cassert>
 #include <cstring> // for memset()
-#include <stdint.h>
 
 #include "correction_state.h"
 #include "defines.h"
@@ -237,7 +236,7 @@
     int mTerminalOutputIndex;
     int mMaxErrors;
 
-    uint8_t mTotalTraverseCount;
+    int mTotalTraverseCount;
 
     // The following arrays are state buffer.
     int mWord[MAX_WORD_LENGTH_INTERNAL];
@@ -352,7 +351,7 @@
     const int prevCO = outputLength >= 2 ? toBaseLowerCase(output[outputLength - 2]) : 0;
     for (int i = 1; i <= inputSize; ++i) {
         const int ci = toBaseLowerCase(input[i - 1]);
-        const uint16_t cost = (ci == co) ? 0 : 1;
+        const int cost = (ci == co) ? 0 : 1;
         current[i] = min(current[i - 1] + 1, min(prev[i] + 1, prev[i - 1] + cost));
         if (i >= 2 && prevprev && ci == prevCO && co == toBaseLowerCase(input[i - 2])) {
             current[i] = min(current[i], prevprev[i - 2] + 1);
diff --git a/native/jni/src/defines.h b/native/jni/src/defines.h
index 3d7ba4f..90f714b 100644
--- a/native/jni/src/defines.h
+++ b/native/jni/src/defines.h
@@ -237,9 +237,6 @@
 
 #endif // FLAG_DBG
 
-#ifndef U_SHORT_MAX
-#define U_SHORT_MAX 65535    // ((1 << 16) - 1)
-#endif
 #ifndef S_INT_MAX
 #define S_INT_MAX 2147483647 // ((1 << 31) - 1)
 #endif
diff --git a/native/jni/src/proximity_info.cpp b/native/jni/src/proximity_info.cpp
index d38ea67..ffe12ce 100644
--- a/native/jni/src/proximity_info.cpp
+++ b/native/jni/src/proximity_info.cpp
@@ -15,7 +15,6 @@
  */
 
 #include <cassert>
-#include <cmath>
 #include <cstring>
 
 #define LOG_TAG "LatinIME: proximity_info.cpp"
diff --git a/native/jni/src/terminal_attributes.h b/native/jni/src/terminal_attributes.h
index fed3c72..6c2e0dc 100644
--- a/native/jni/src/terminal_attributes.h
+++ b/native/jni/src/terminal_attributes.h
@@ -17,6 +17,7 @@
 #ifndef LATINIME_TERMINAL_ATTRIBUTES_H
 #define LATINIME_TERMINAL_ATTRIBUTES_H
 
+#include <stdint.h>
 #include "binary_format.h"
 
 namespace latinime {