summaryrefslogtreecommitdiffstats
path: root/src/storage
diff options
context:
space:
mode:
authorPeng Wu <alexepico@gmail.com>2012-10-19 16:11:47 +0800
committerPeng Wu <alexepico@gmail.com>2012-10-19 16:11:47 +0800
commit60265e9a6bcc58bcaec8dc07611f2c30371c2165 (patch)
tree868561e5125c3156685e98be1e645cdef327254c /src/storage
parentea6a9973cc5f14709a84f390789b7b2bec47c1c2 (diff)
downloadlibpinyin-60265e9a6bcc58bcaec8dc07611f2c30371c2165.tar.gz
libpinyin-60265e9a6bcc58bcaec8dc07611f2c30371c2165.tar.xz
libpinyin-60265e9a6bcc58bcaec8dc07611f2c30371c2165.zip
refine reduce_tokens
Diffstat (limited to 'src/storage')
-rw-r--r--src/storage/phrase_large_table2.h5
1 files changed, 1 insertions, 4 deletions
diff --git a/src/storage/phrase_large_table2.h b/src/storage/phrase_large_table2.h
index 03dc185..6a73851 100644
--- a/src/storage/phrase_large_table2.h
+++ b/src/storage/phrase_large_table2.h
@@ -121,10 +121,7 @@ static inline int reduce_tokens(PhraseTokens tokens,
num += array->len;
- for (size_t j = 0; j < array->len; ++j) {
- phrase_token_t token = g_array_index(array, phrase_token_t, j);
- g_array_append_val(tokenarray, token);
- }
+ g_array_append_vals(tokenarray, array->data, array->len);
}
/* the following line will be removed in future after code are verified. */