diff options
author | 2019-07-01 21:00:09 +0000 | |
---|---|---|
committer | 2019-07-01 21:00:09 +0000 | |
commit | 7c33185b41d774123ab565fa8b6d7afac44c1b18 (patch) | |
tree | c1d7ddd47896f4047d307169973e794f2941b029 /native/jni/src | |
parent | e4c638b34727c03a1adfba594d95e3f469c56a34 (diff) | |
parent | 751578eb61b47ba3e85054dd57c1df3e4b94f1fb (diff) | |
download | latinime-7c33185b41d774123ab565fa8b6d7afac44c1b18.tar.gz latinime-7c33185b41d774123ab565fa8b6d7afac44c1b18.tar.xz latinime-7c33185b41d774123ab565fa8b6d7afac44c1b18.zip |
DO NOT MERGE - Merge qt-dev-plus-aosp-without-vendor (5699924) into stage-aosp-master
Bug: 134405016
Change-Id: If86628b9fc81ba5a599ae42e2901066c6bccf173
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 |