summaryrefslogtreecommitdiffstats
path: root/tests/storage/test_chewing_table.cpp
diff options
context:
space:
mode:
authorPeng Wu <alexepico@gmail.com>2012-08-31 15:00:06 +0800
committerPeng Wu <alexepico@gmail.com>2012-08-31 15:01:44 +0800
commitea1c8d88ee73d012bb128122d4dc012921df49b6 (patch)
treed7cc6b3e78c3a37690ff77dc8fa244960bdb0643 /tests/storage/test_chewing_table.cpp
parent9ee32e665929ad81bd6688272868510eb5716d7c (diff)
downloadlibpinyin-ea1c8d88ee73d012bb128122d4dc012921df49b6.zip
libpinyin-ea1c8d88ee73d012bb128122d4dc012921df49b6.tar.gz
libpinyin-ea1c8d88ee73d012bb128122d4dc012921df49b6.tar.xz
drop FacadePhraseIndex::clear_ranges method
Diffstat (limited to 'tests/storage/test_chewing_table.cpp')
-rw-r--r--tests/storage/test_chewing_table.cpp8
1 files changed, 6 insertions, 2 deletions
diff --git a/tests/storage/test_chewing_table.cpp b/tests/storage/test_chewing_table.cpp
index a826f46..e1189b5 100644
--- a/tests/storage/test_chewing_table.cpp
+++ b/tests/storage/test_chewing_table.cpp
@@ -63,9 +63,13 @@ int main(int argc, char * argv[]) {
for (size_t i = 0; i < bench_times; ++i) {
largetable.search(keys->len, (ChewingKey *)keys->data, ranges);
- }
- phrase_index.clear_ranges(ranges);
+ /* clear ranges. */
+ for (size_t i = 0; i < PHRASE_INDEX_LIBRARY_COUNT; ++i) {
+ if (ranges[i])
+ g_array_set_size(ranges[i], 0);
+ }
+ }
print_time(start, bench_times);