aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSatoshi Kataoka <satok@google.com>2013-05-01 13:20:53 +0900
committerSatoshi Kataoka <satok@google.com>2013-05-01 13:34:08 +0900
commitdf2eae6e69948e99618a28d087b847c70582efd8 (patch)
tree758626a8583f85e5dea1b5af6bfd6e99d135d4de
parent7b2114a4283ccd90a937b14145c11125824cd1bd (diff)
downloadlatinime-df2eae6e69948e99618a28d087b847c70582efd8.tar.gz
latinime-df2eae6e69948e99618a28d087b847c70582efd8.tar.xz
latinime-df2eae6e69948e99618a28d087b847c70582efd8.zip
Fix exact match profanity
Bug: 8661070 Change-Id: I421bed14cc71af7715101423652d706e33958445
-rw-r--r--native/jni/src/suggest/core/suggest.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/native/jni/src/suggest/core/suggest.cpp b/native/jni/src/suggest/core/suggest.cpp
index 3221dee9c..0ff7454b6 100644
--- a/native/jni/src/suggest/core/suggest.cpp
+++ b/native/jni/src/suggest/core/suggest.cpp
@@ -164,8 +164,8 @@ int Suggest::outputSuggestions(DicTraverseSession *traverseSession, int *frequen
const bool isPossiblyOffensiveWord = terminalDicNode->getProbability() <= 0;
const bool isExactMatch = terminalDicNode->isExactMatch();
const int outputTypeFlags =
- isPossiblyOffensiveWord ? Dictionary::KIND_FLAG_POSSIBLY_OFFENSIVE : 0
- | isExactMatch ? Dictionary::KIND_FLAG_EXACT_MATCH : 0;
+ (isPossiblyOffensiveWord ? Dictionary::KIND_FLAG_POSSIBLY_OFFENSIVE : 0)
+ | (isExactMatch ? Dictionary::KIND_FLAG_EXACT_MATCH : 0);
// Entries that are blacklisted or do not represent a word should not be output.
const bool isValidWord = !terminalAttributes.isBlacklistedOrNotAWord();