diff options
author | 2012-08-12 19:07:44 -0700 | |
---|---|---|
committer | 2012-08-12 19:07:44 -0700 | |
commit | 7b4531a16f0d7f237822e94f3e962257ee9d0c16 (patch) | |
tree | 2237aa0f754e3ab44ccfac034f5ef6e17ffda724 /native/jni/src/debug.h | |
parent | f9b2841fb592778ad34b5181e1c0bcbf551e3632 (diff) | |
parent | bcec82de66f52655593dc233346f11468f5077a0 (diff) | |
download | latinime-7b4531a16f0d7f237822e94f3e962257ee9d0c16.tar.gz latinime-7b4531a16f0d7f237822e94f3e962257ee9d0c16.tar.xz latinime-7b4531a16f0d7f237822e94f3e962257ee9d0c16.zip |
am bcec82de: Clean up constructors
* commit 'bcec82de66f52655593dc233346f11468f5077a0':
Clean up constructors
Diffstat (limited to 'native/jni/src/debug.h')
-rw-r--r-- | native/jni/src/debug.h | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/native/jni/src/debug.h b/native/jni/src/debug.h index 2168d6672..2432b1f2e 100644 --- a/native/jni/src/debug.h +++ b/native/jni/src/debug.h @@ -58,11 +58,12 @@ static inline void LOGI_S16_PLUS(unsigned short *string, const unsigned int leng } static inline void printDebug(const char *tag, int *codes, int codesSize, int MAX_PROXIMITY_CHARS) { - unsigned char *buf = (unsigned char*)malloc((1 + codesSize) * sizeof(*buf)); + unsigned char *buf = reinterpret_cast<unsigned char *>(malloc((1 + codesSize) * sizeof(*buf))); buf[codesSize] = 0; - while (--codesSize >= 0) - buf[codesSize] = (unsigned char)codes[codesSize * MAX_PROXIMITY_CHARS]; + while (--codesSize >= 0) { + buf[codesSize] = static_cast<unsigned char>(codes[codesSize * MAX_PROXIMITY_CHARS]); + } AKLOGI("%s, WORD = %s", tag, buf); free(buf); |