summaryrefslogtreecommitdiffstats
path: root/src/storage
diff options
context:
space:
mode:
authorPeng Wu <alexepico@gmail.com>2012-10-20 16:26:02 +0800
committerPeng Wu <alexepico@gmail.com>2012-10-20 16:26:37 +0800
commit2d42f29d97bcab3707365fdaa6df6920b2430ccb (patch)
tree7f5c0fc036f8eba180cf090cffe5587b1547ff37 /src/storage
parent60265e9a6bcc58bcaec8dc07611f2c30371c2165 (diff)
downloadlibpinyin-2d42f29d97bcab3707365fdaa6df6920b2430ccb.tar.gz
libpinyin-2d42f29d97bcab3707365fdaa6df6920b2430ccb.tar.xz
libpinyin-2d42f29d97bcab3707365fdaa6df6920b2430ccb.zip
move get_first_token to spseg
Diffstat (limited to 'src/storage')
-rw-r--r--src/storage/phrase_large_table2.h23
1 files changed, 0 insertions, 23 deletions
diff --git a/src/storage/phrase_large_table2.h b/src/storage/phrase_large_table2.h
index 6a73851..dd1a1e4 100644
--- a/src/storage/phrase_large_table2.h
+++ b/src/storage/phrase_large_table2.h
@@ -130,29 +130,6 @@ static inline int reduce_tokens(PhraseTokens tokens,
return num;
}
-/* for compatibility. */
-static inline int get_first_token(PhraseTokens tokens,
- /* out */ phrase_token_t & token){
- int num = 0; token = null_token;
-
- for (size_t i = 0; i < PHRASE_INDEX_LIBRARY_COUNT; ++i) {
- GArray * array = tokens[i];
- if (NULL == array || 0 == array->len)
- continue;
-
- num += array->len;
-
- if (null_token == token) {
- token = g_array_index(array, phrase_token_t, 0);
- }
- }
-
- /* the following line will be removed in future after code are verified. */
- assert(0 == num || 1 == num);
-
- return num;
-}
-
};
#endif