summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorPeng Wu <alexepico@gmail.com>2010-11-08 15:48:54 +0800
committerPeng Wu <alexepico@gmail.com>2010-11-08 15:48:54 +0800
commit3d9a371be1e2f85ae3b43a6b88c51e60f1a204c8 (patch)
tree27ae94af466cad464fb4a99fe9fb4d559f6f4ae7 /src
parenta4f92d38d0bfe20d69eddda95aaebc57e5b39d3b (diff)
downloadlibpinyin-3d9a371be1e2f85ae3b43a6b88c51e60f1a204c8.tar.gz
libpinyin-3d9a371be1e2f85ae3b43a6b88c51e60f1a204c8.tar.xz
libpinyin-3d9a371be1e2f85ae3b43a6b88c51e60f1a204c8.zip
re-factor code
Diffstat (limited to 'src')
-rw-r--r--src/storage/phrase_large_table.cpp3
-rw-r--r--src/storage/pinyin_large_table.cpp3
2 files changed, 2 insertions, 4 deletions
diff --git a/src/storage/phrase_large_table.cpp b/src/storage/phrase_large_table.cpp
index ad3262f..7a3bc1c 100644
--- a/src/storage/phrase_large_table.cpp
+++ b/src/storage/phrase_large_table.cpp
@@ -450,8 +450,7 @@ bool PhraseLengthIndexLevel::load(MemoryChunk * chunk, table_offset_t offset, ta
index++;
phrase_end = *index;
if ( phrase_begin == phrase_end ){
- void * null = NULL;
- g_array_append_val(m_phrase_array_indexes, null);
+ g_array_append_val(m_phrase_array_indexes, null_token);
continue;
}
diff --git a/src/storage/pinyin_large_table.cpp b/src/storage/pinyin_large_table.cpp
index 0a1a8db..f92f883 100644
--- a/src/storage/pinyin_large_table.cpp
+++ b/src/storage/pinyin_large_table.cpp
@@ -628,8 +628,7 @@ bool PinyinLengthIndexLevel::load(MemoryChunk * chunk, table_offset_t offset, ta
index++;
phrase_end = *index;
if ( phrase_begin == phrase_end ){
- void * null = NULL;
- g_array_append_val(m_pinyin_array_indexes, null);
+ g_array_append_val(m_pinyin_array_indexes, null_token);
continue;
}