aboutsummaryrefslogtreecommitdiffstats
path: root/native/jni/src/words_priority_queue_pool.h
diff options
context:
space:
mode:
authorKen Wakasa <kwakasa@google.com>2012-11-03 02:50:47 +0900
committerKen Wakasa <kwakasa@google.com>2012-11-05 14:26:53 +0900
commit6e66349ed1d37c24a1a23bf117df6750ad53d322 (patch)
tree81870219766a74e85af6937d306e1f13662ed47a /native/jni/src/words_priority_queue_pool.h
parent19d844c7a7dccf2b4f03003f1fae65496526999f (diff)
downloadlatinime-6e66349ed1d37c24a1a23bf117df6750ad53d322.tar.gz
latinime-6e66349ed1d37c24a1a23bf117df6750ad53d322.tar.xz
latinime-6e66349ed1d37c24a1a23bf117df6750ad53d322.zip
Adjust compiler warning options with the offdevice Makefile
Make use of AK_FORCE_INLINE for -Winline and better performance Change-Id: If0016e2ef61c1fe007c83bb1a5133a6b6bde568e
Diffstat (limited to 'native/jni/src/words_priority_queue_pool.h')
-rw-r--r--native/jni/src/words_priority_queue_pool.h5
1 files changed, 3 insertions, 2 deletions
diff --git a/native/jni/src/words_priority_queue_pool.h b/native/jni/src/words_priority_queue_pool.h
index 2d52903e0..c14afa07b 100644
--- a/native/jni/src/words_priority_queue_pool.h
+++ b/native/jni/src/words_priority_queue_pool.h
@@ -36,7 +36,8 @@ class WordsPriorityQueuePool {
}
}
- virtual ~WordsPriorityQueuePool() {
+ // Non virtual inline destructor -- never inherit this class
+ ~WordsPriorityQueuePool() {
// Note: these explicit calls to the destructor match the calls to placement new() above.
if (mMasterQueue) mMasterQueue->~WordsPriorityQueue();
for (int i = 0; i < MULTIPLE_WORDS_SUGGESTION_MAX_WORDS * SUB_QUEUE_MAX_COUNT; ++i) {
@@ -68,7 +69,7 @@ class WordsPriorityQueuePool {
}
}
- inline void clearSubQueue(const int wordIndex) {
+ AK_FORCE_INLINE void clearSubQueue(const int wordIndex) {
for (int i = 0; i < SUB_QUEUE_MAX_COUNT; ++i) {
WordsPriorityQueue *queue = getSubQueue(wordIndex, i);
if (queue) {