diff options
author | 2014-08-25 16:52:12 +0900 | |
---|---|---|
committer | 2014-08-25 16:52:12 +0900 | |
commit | c04ae7758358eac29899fa43cfa91bb32f9c0cf1 (patch) | |
tree | 82ce534973ecee98006529f54cc017c90b5c957a /native/jni/src | |
parent | e38f79182d61c2b965cc3b47065c17107865df46 (diff) | |
download | latinime-c04ae7758358eac29899fa43cfa91bb32f9c0cf1.tar.gz latinime-c04ae7758358eac29899fa43cfa91bb32f9c0cf1.tar.xz latinime-c04ae7758358eac29899fa43cfa91bb32f9c0cf1.zip |
Add ByteArrayUtilsTest.
Change-Id: I4695a2573b4d2d8331fc9ce1e9ff83397791a586
Diffstat (limited to 'native/jni/src')
-rw-r--r-- | native/jni/src/suggest/policyimpl/dictionary/utils/buffer_with_extendable_buffer.cpp | 2 | ||||
-rw-r--r-- | native/jni/src/suggest/policyimpl/dictionary/utils/byte_array_utils.h | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/native/jni/src/suggest/policyimpl/dictionary/utils/buffer_with_extendable_buffer.cpp b/native/jni/src/suggest/policyimpl/dictionary/utils/buffer_with_extendable_buffer.cpp index 833063c17..ecbe7922c 100644 --- a/native/jni/src/suggest/policyimpl/dictionary/utils/buffer_with_extendable_buffer.cpp +++ b/native/jni/src/suggest/policyimpl/dictionary/utils/buffer_with_extendable_buffer.cpp @@ -31,7 +31,7 @@ uint32_t BufferWithExtendableBuffer::readUint(const int size, const int pos) con uint32_t BufferWithExtendableBuffer::readUintAndAdvancePosition(const int size, int *const pos) const { - const int value = readUint(size, *pos); + const uint32_t value = readUint(size, *pos); *pos += size; return value; } diff --git a/native/jni/src/suggest/policyimpl/dictionary/utils/byte_array_utils.h b/native/jni/src/suggest/policyimpl/dictionary/utils/byte_array_utils.h index c0a9fcb1d..4b3c98988 100644 --- a/native/jni/src/suggest/policyimpl/dictionary/utils/byte_array_utils.h +++ b/native/jni/src/suggest/policyimpl/dictionary/utils/byte_array_utils.h @@ -114,7 +114,7 @@ class ByteArrayUtils { return buffer[(*pos)++]; } - static AK_FORCE_INLINE int readUint(const uint8_t *const buffer, + static AK_FORCE_INLINE uint32_t readUint(const uint8_t *const buffer, const int size, const int pos) { // size must be in 1 to 4. ASSERT(size >= 1 && size <= 4); |