diff options
author | 2012-11-03 02:50:47 +0900 | |
---|---|---|
committer | 2012-11-05 14:26:53 +0900 | |
commit | 6e66349ed1d37c24a1a23bf117df6750ad53d322 (patch) | |
tree | 81870219766a74e85af6937d306e1f13662ed47a /native/jni/src/proximity_info_state.h | |
parent | 19d844c7a7dccf2b4f03003f1fae65496526999f (diff) | |
download | latinime-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/proximity_info_state.h')
-rw-r--r-- | native/jni/src/proximity_info_state.h | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/native/jni/src/proximity_info_state.h b/native/jni/src/proximity_info_state.h index 9b859606d..39a238889 100644 --- a/native/jni/src/proximity_info_state.h +++ b/native/jni/src/proximity_info_state.h @@ -50,7 +50,7 @@ class ProximityInfoState { ///////////////////////////////////////// // Defined here // ///////////////////////////////////////// - ProximityInfoState() + AK_FORCE_INLINE ProximityInfoState() : mProximityInfo(0), mMaxPointToKeyLength(0), mHasTouchPositionCorrectionData(false), mMostCommonKeyWidthSquare(0), mLocaleStr(), mKeyCount(0), mCellHeight(0), mCellWidth(0), mGridHeight(0), mGridWidth(0), @@ -63,13 +63,14 @@ class ProximityInfoState { memset(mPrimaryInputWord, 0, sizeof(mPrimaryInputWord)); } - virtual ~ProximityInfoState() {} + // Non virtual inline destructor -- never inherit this class + AK_FORCE_INLINE ~ProximityInfoState() {} inline int getPrimaryCodePointAt(const int index) const { return getProximityCodePointsAt(index)[0]; } - inline bool existsCodePointInProximityAt(const int index, const int c) const { + AK_FORCE_INLINE bool existsCodePointInProximityAt(const int index, const int c) const { const int *codePoints = getProximityCodePointsAt(index); int i = 0; while (codePoints[i] > 0 && i < MAX_PROXIMITY_CHARS_SIZE_INTERNAL) { |