diff options
author | 2011-07-15 13:49:00 +0900 | |
---|---|---|
committer | 2011-08-01 15:42:09 +0900 | |
commit | 2df3060883c7535029c7dfbbb4f7b05935d796ae (patch) | |
tree | fbaf235dbcbffcd71ae1e563bc6580b0a19b5b88 /native/src/proximity_info.cpp | |
parent | e00d44d0c8a1420482121f2f3347def9ef430778 (diff) | |
download | latinime-2df3060883c7535029c7dfbbb4f7b05935d796ae.tar.gz latinime-2df3060883c7535029c7dfbbb4f7b05935d796ae.tar.xz latinime-2df3060883c7535029c7dfbbb4f7b05935d796ae.zip |
Add correction state
Change-Id: I0d281cede1590893bd1def005cf83c9431d12750
Diffstat (limited to 'native/src/proximity_info.cpp')
-rw-r--r-- | native/src/proximity_info.cpp | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/native/src/proximity_info.cpp b/native/src/proximity_info.cpp index c45393f18..bed92cf9e 100644 --- a/native/src/proximity_info.cpp +++ b/native/src/proximity_info.cpp @@ -78,7 +78,7 @@ unsigned short ProximityInfo::getPrimaryCharAt(const int index) const { return getProximityCharsAt(index)[0]; } -bool ProximityInfo::existsCharInProximityAt(const int index, const int c) const { +inline bool ProximityInfo::existsCharInProximityAt(const int index, const int c) const { const int *chars = getProximityCharsAt(index); int i = 0; while (chars[i] > 0 && i < MAX_PROXIMITY_CHARS_SIZE) { @@ -114,8 +114,10 @@ bool ProximityInfo::existsAdjacentProximityChars(const int index) const { // in their list. The non-accented version of the character should be considered // "close", but not the other keys close to the non-accented version. ProximityInfo::ProximityType ProximityInfo::getMatchedProximityId( - const int index, const unsigned short c, const int skipPos, - const int excessivePos, const int transposedPos) const { + const int index, const unsigned short c, CorrectionState *correctionState) const { + const int skipPos = correctionState->getSkipPos(); + const int excessivePos = correctionState->getExcessivePos(); + const int transposedPos = correctionState->getTransposedPos(); const int *currentChars = getProximityCharsAt(index); const unsigned short baseLowerC = Dictionary::toBaseLowerCase(c); |