projects
/
platform
/
upstream
/
libpinyin.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
ea6a997
)
refine reduce_tokens
author
Peng Wu
<alexepico@gmail.com>
Fri, 19 Oct 2012 08:11:47 +0000
(16:11 +0800)
committer
Peng Wu
<alexepico@gmail.com>
Fri, 19 Oct 2012 08:11:47 +0000
(16:11 +0800)
src/storage/phrase_large_table2.h
patch
|
blob
|
history
diff --git
a/src/storage/phrase_large_table2.h
b/src/storage/phrase_large_table2.h
index
03dc185
..
6a73851
100644
(file)
--- 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. */