From 30ab10a144bb53ca9be1036d9cb7627389f263c2 Mon Sep 17 00:00:00 2001 From: Ken Wakasa Date: Fri, 21 Dec 2012 01:01:04 +0900 Subject: [PATCH] Tiny cleanups Change-Id: Ie648a9da326cb194d96cb5f5a6966af0608367b4 --- native/jni/src/suggest/gesture_suggest.h | 12 ++++++------ native/jni/src/suggest/suggest_interface.h | 4 ++-- native/jni/src/suggest/typing_suggest.h | 12 ++++++------ 3 files changed, 14 insertions(+), 14 deletions(-) diff --git a/native/jni/src/suggest/gesture_suggest.h b/native/jni/src/suggest/gesture_suggest.h index a6f9cb73b..e4af03fb8 100644 --- a/native/jni/src/suggest/gesture_suggest.h +++ b/native/jni/src/suggest/gesture_suggest.h @@ -38,9 +38,9 @@ class GestureSuggest : public SuggestInterface { if (!mSuggestInterface) { return 0; } - return mSuggestInterface->getSuggestions(pInfo, traverseSession, inputXs, - inputYs, times, pointerIds, codes, inputSize, commitPoint, outWords, frequencies, - outputIndices, outputTypes); + return mSuggestInterface->getSuggestions(pInfo, traverseSession, inputXs, inputYs, times, + pointerIds, codes, inputSize, commitPoint, outWords, frequencies, outputIndices, + outputTypes); } static void setGestureSuggestFactoryMethod(SuggestInterface *(*factoryMethod)(int, int)) { @@ -50,10 +50,10 @@ class GestureSuggest : public SuggestInterface { private: DISALLOW_IMPLICIT_CONSTRUCTORS(GestureSuggest); static SuggestInterface *getGestureSuggestInstance(int maxWordLength, int maxWords) { - if (sGestureSuggestFactoryMethod) { - return sGestureSuggestFactoryMethod(maxWordLength, maxWords); + if (!sGestureSuggestFactoryMethod) { + return 0; } - return 0; + return sGestureSuggestFactoryMethod(maxWordLength, maxWords); } static SuggestInterface *(*sGestureSuggestFactoryMethod)(int, int); diff --git a/native/jni/src/suggest/suggest_interface.h b/native/jni/src/suggest/suggest_interface.h index 67829de0d..de58e7918 100644 --- a/native/jni/src/suggest/suggest_interface.h +++ b/native/jni/src/suggest/suggest_interface.h @@ -28,8 +28,8 @@ class SuggestInterface { virtual int getSuggestions(ProximityInfo *pInfo, void *traverseSession, int *inputXs, int *inputYs, int *times, int *pointerIds, int *codes, int inputSize, int commitPoint, int *outWords, int *frequencies, int *outputIndices, int *outputTypes) const = 0; - SuggestInterface() { }; - virtual ~SuggestInterface() { }; + SuggestInterface() {}; + virtual ~SuggestInterface() {}; private: DISALLOW_COPY_AND_ASSIGN(SuggestInterface); }; diff --git a/native/jni/src/suggest/typing_suggest.h b/native/jni/src/suggest/typing_suggest.h index d35e411e2..9de4158f5 100644 --- a/native/jni/src/suggest/typing_suggest.h +++ b/native/jni/src/suggest/typing_suggest.h @@ -38,9 +38,9 @@ class TypingSuggest : public SuggestInterface { if (!mSuggestInterface) { return 0; } - return mSuggestInterface->getSuggestions(pInfo, traverseSession, inputXs, - inputYs, times, pointerIds, codes, inputSize, commitPoint, outWords, frequencies, - outputIndices, outputTypes); + return mSuggestInterface->getSuggestions(pInfo, traverseSession, inputXs, inputYs, times, + pointerIds, codes, inputSize, commitPoint, outWords, frequencies, outputIndices, + outputTypes); } static void setTypingSuggestFactoryMethod(SuggestInterface *(*factoryMethod)(int, int)) { @@ -50,10 +50,10 @@ class TypingSuggest : public SuggestInterface { private: DISALLOW_IMPLICIT_CONSTRUCTORS(TypingSuggest); static SuggestInterface *getTypingSuggestInstance(int maxWordLength, int maxWords) { - if (sTypingSuggestFactoryMethod) { - return sTypingSuggestFactoryMethod(maxWordLength, maxWords); + if (!sTypingSuggestFactoryMethod) { + return 0; } - return 0; + return sTypingSuggestFactoryMethod(maxWordLength, maxWords); } static SuggestInterface *(*sTypingSuggestFactoryMethod)(int, int);