diff options
author | 2012-08-02 19:48:08 +0900 | |
---|---|---|
committer | 2012-08-02 20:19:39 +0900 | |
commit | 77e8e81ad95cfc1eb8f8407fc872674b8d08bbe9 (patch) | |
tree | 7bb46286f51ff0a1349577cc741940d21e918603 /native/jni/src/defines.h | |
parent | ffe36cdc6d41d0ad1031e7d9f8acf6b6f1008970 (diff) | |
download | latinime-77e8e81ad95cfc1eb8f8407fc872674b8d08bbe9.tar.gz latinime-77e8e81ad95cfc1eb8f8407fc872674b8d08bbe9.tar.xz latinime-77e8e81ad95cfc1eb8f8407fc872674b8d08bbe9.zip |
Header cleanup. Moved a couple of functions from .h to .cpp.
Change-Id: Ifd12a7632f75395bd0ef5e394d5c2abd6cbe28c6
Diffstat (limited to 'native/jni/src/defines.h')
-rw-r--r-- | native/jni/src/defines.h | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/native/jni/src/defines.h b/native/jni/src/defines.h index e172b0441..2b30f3c96 100644 --- a/native/jni/src/defines.h +++ b/native/jni/src/defines.h @@ -88,7 +88,7 @@ static inline void prof_out(void) { AKLOGI("Error: You must call PROF_OPEN before PROF_CLOSE."); } AKLOGI("Total time is %6.3f ms.", - profile_buf[PROF_BUF_SIZE - 1] * 1000 / (float)CLOCKS_PER_SEC); + profile_buf[PROF_BUF_SIZE - 1] * 1000.0f / static_cast<float>(CLOCKS_PER_SEC)); float all = 0; for (int i = 0; i < PROF_BUF_SIZE - 1; ++i) { all += profile_buf[i]; @@ -98,7 +98,8 @@ static inline void prof_out(void) { if (profile_buf[i]) { AKLOGI("(%d): Used %4.2f%%, %8.4f ms. Called %d times.", i, (profile_buf[i] * 100 / all), - profile_buf[i] * 1000 / (float)CLOCKS_PER_SEC, profile_counter[i]); + profile_buf[i] * 1000.0f / static_cast<float>(CLOCKS_PER_SEC), + profile_counter[i]); } } } |