diff options
author | 2019-09-04 13:34:53 -0700 | |
---|---|---|
committer | 2019-09-04 13:34:53 -0700 | |
commit | 66fb808791b86e7e0903a834fdfa187132ea0bdf (patch) | |
tree | 06816df073e9c2aedd67f8806efed9e31d25517f /native/jni/src | |
parent | c8db60faa55ef3ee9780b13ce361f5c08756a5f1 (diff) | |
parent | 7748102af148a0b0321bb03446a5b207952eed01 (diff) | |
download | latinime-66fb808791b86e7e0903a834fdfa187132ea0bdf.tar.gz latinime-66fb808791b86e7e0903a834fdfa187132ea0bdf.tar.xz latinime-66fb808791b86e7e0903a834fdfa187132ea0bdf.zip |
DO NOT MERGE - Merge Android 10 into master
Bug: 139893257
Change-Id: I67cbe34b4646ddfdb0868bf8eaca12100a4e7b16
Diffstat (limited to 'native/jni/src')
-rw-r--r-- | native/jni/src/defines.h | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/native/jni/src/defines.h b/native/jni/src/defines.h index 10b930e4f..1531b6cbe 100644 --- a/native/jni/src/defines.h +++ b/native/jni/src/defines.h @@ -17,6 +17,8 @@ #ifndef LATINIME_DEFINES_H #define LATINIME_DEFINES_H +#include <cstdint> + #ifdef __GNUC__ #define AK_FORCE_INLINE __attribute__((always_inline)) __inline__ #else // __GNUC__ @@ -51,7 +53,7 @@ AK_FORCE_INLINE static int intArrayToCharArray(const int *const source, const in int si = 0; int di = 0; while (si < sourceSize && di < destLimit && 0 != source[si]) { - const int codePoint = source[si++]; + const uint32_t codePoint = static_cast<uint32_t>(source[si++]); if (codePoint < 0x7F) { // One byte dest[di++] = codePoint; } else if (codePoint < 0x7FF) { // Two bytes |