summaryrefslogtreecommitdiffstats
path: root/src/storage/pinyin_large_table.cpp
diff options
context:
space:
mode:
authorPeng Wu <alexepico@gmail.com>2010-08-27 14:24:02 +0800
committerPeng Wu <alexepico@gmail.com>2010-08-27 14:24:02 +0800
commitb0ea21fda50b43d964f8ddc84f62ff3bb61043c8 (patch)
treeef3b2cffe805f51f78b4f9b4f61fbf12d519d01a /src/storage/pinyin_large_table.cpp
parent38068dc1f723f3960c144d82ec74eab7ecae9a31 (diff)
downloadlibpinyin-b0ea21fda50b43d964f8ddc84f62ff3bb61043c8.tar.gz
libpinyin-b0ea21fda50b43d964f8ddc84f62ff3bb61043c8.tar.xz
libpinyin-b0ea21fda50b43d964f8ddc84f62ff3bb61043c8.zip
begin to add add_index/remove_index.
Diffstat (limited to 'src/storage/pinyin_large_table.cpp')
-rw-r--r--src/storage/pinyin_large_table.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/storage/pinyin_large_table.cpp b/src/storage/pinyin_large_table.cpp
index 9f0f8ee..7d0ac4a 100644
--- a/src/storage/pinyin_large_table.cpp
+++ b/src/storage/pinyin_large_table.cpp
@@ -390,13 +390,13 @@ int PinyinLengthIndexLevel::add_index( int phrase_length, /* in */ PinyinKey key
int PinyinLengthIndexLevel::remove_index( int phrase_length, /* in */ PinyinKey keys[], /* in */ phrase_token_t token){
assert(phrase_length + 1 < MAX_PHRASE_LENGTH);
if ( m_pinyin_array_indexes -> len <= phrase_length )
- return false;
+ return REMOVE_ITEM_DONOT_EXISTS;
#define CASE(len) case len: \
{ \
PinyinArrayIndexLevel<len> * &array = g_array_index \
(m_pinyin_array_indexes, PinyinArrayIndexLevel<len> *, len); \
if ( !array ) \
- return false; \
+ return REMOVE_ITEM_DONOT_EXISTS; \
return array->remove_index(keys, token); \
}
switch(phrase_length){