summaryrefslogtreecommitdiffstats
path: root/src/storage/facade_chewing_table.h
diff options
context:
space:
mode:
authorPeng Wu <alexepico@gmail.com>2012-01-09 13:12:53 +0800
committerPeng Wu <alexepico@gmail.com>2012-01-09 13:59:21 +0800
commit18e2714d4c67d55d9c054f8087b297e7862b433f (patch)
tree44543a31bf8390515f30a00bc0f3d66e3cb8fc01 /src/storage/facade_chewing_table.h
parent35b1fe95f26dfb0581d7212f61b402091d6c68d2 (diff)
downloadlibpinyin-18e2714d4c67d55d9c054f8087b297e7862b433f.tar.gz
libpinyin-18e2714d4c67d55d9c054f8087b297e7862b433f.tar.xz
libpinyin-18e2714d4c67d55d9c054f8087b297e7862b433f.zip
fixes facade_*_table.h
Diffstat (limited to 'src/storage/facade_chewing_table.h')
-rw-r--r--src/storage/facade_chewing_table.h7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/storage/facade_chewing_table.h b/src/storage/facade_chewing_table.h
index e411589..34bf55b 100644
--- a/src/storage/facade_chewing_table.h
+++ b/src/storage/facade_chewing_table.h
@@ -67,6 +67,13 @@ public:
/* search method */
int search(int phrase_length, /* in */ ChewingKey keys[],
/* out */ PhraseIndexRanges ranges) const {
+
+ /* clear ranges. */
+ for (size_t i = 0; i < PHRASE_INDEX_LIBRARY_COUNT; ++i) {
+ if (ranges[i])
+ g_array_set_size(ranges[i], 0);
+ }
+
int result = SEARCH_NONE;
if (NULL != m_system_chewing_table)