aboutsummaryrefslogtreecommitdiffstats
path: root/java/src/com/android/inputmethod/latin/makedict/FusionDictionary.java
diff options
context:
space:
mode:
authorJean Chalard <jchalard@google.com>2013-07-23 18:57:46 -0700
committerAndroid Git Automerger <android-git-automerger@android.com>2013-07-23 18:57:46 -0700
commit9b4d0c7047e6585be4d79156ee8dbbafdb0eb152 (patch)
treea537a716ccb277bbc31b06eaf91d4e5b7e02fb9a /java/src/com/android/inputmethod/latin/makedict/FusionDictionary.java
parentd7da546fbbe6a49244d00b7cf9092d3df2393094 (diff)
parent5526d138fe76e7d19a58ab68c9ba7a0354172daa (diff)
downloadlatinime-9b4d0c7047e6585be4d79156ee8dbbafdb0eb152.tar.gz
latinime-9b4d0c7047e6585be4d79156ee8dbbafdb0eb152.tar.xz
latinime-9b4d0c7047e6585be4d79156ee8dbbafdb0eb152.zip
am 5526d138: Merge "[FD2] Separate cached address before/after update for nodes."
* commit '5526d138fe76e7d19a58ab68c9ba7a0354172daa': [FD2] Separate cached address before/after update for nodes.
Diffstat (limited to 'java/src/com/android/inputmethod/latin/makedict/FusionDictionary.java')
-rw-r--r--java/src/com/android/inputmethod/latin/makedict/FusionDictionary.java8
1 files changed, 7 insertions, 1 deletions
diff --git a/java/src/com/android/inputmethod/latin/makedict/FusionDictionary.java b/java/src/com/android/inputmethod/latin/makedict/FusionDictionary.java
index 17d281518..5530b7a74 100644
--- a/java/src/com/android/inputmethod/latin/makedict/FusionDictionary.java
+++ b/java/src/com/android/inputmethod/latin/makedict/FusionDictionary.java
@@ -46,7 +46,13 @@ public final class FusionDictionary implements Iterable<Word> {
ArrayList<CharGroup> mData;
// To help with binary generation
int mCachedSize = Integer.MIN_VALUE;
- int mCachedAddress = Integer.MIN_VALUE;
+ // mCachedAddressBefore/AfterUpdate are helpers for binary dictionary generation. They
+ // always hold the same value except between dictionary address compression, during which
+ // the update process needs to know about both values at the same time. Updating will
+ // update the AfterUpdate value, and the code will move them to BeforeUpdate before
+ // the next update pass.
+ int mCachedAddressBeforeUpdate = Integer.MIN_VALUE;
+ int mCachedAddressAfterUpdate = Integer.MIN_VALUE;
int mCachedParentAddress = 0;
public Node() {