diff options
author | Peng Wu <alexepico@gmail.com> | 2012-06-19 14:41:18 +0800 |
---|---|---|
committer | Peng Wu <alexepico@gmail.com> | 2012-06-19 14:41:18 +0800 |
commit | 3120e3f3208f3b0c9e30a811102e0d2ea9c5e29e (patch) | |
tree | 3a2a3d3ecb0ef125687c00773a6e06fe01d52c66 /src/storage | |
parent | 05945ae69172859cb26f33363faccb76cb189629 (diff) | |
download | libpinyin-3120e3f3208f3b0c9e30a811102e0d2ea9c5e29e.tar.gz libpinyin-3120e3f3208f3b0c9e30a811102e0d2ea9c5e29e.tar.xz libpinyin-3120e3f3208f3b0c9e30a811102e0d2ea9c5e29e.zip |
fixes phrase library load
Diffstat (limited to 'src/storage')
-rw-r--r-- | src/storage/phrase_index.h | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/src/storage/phrase_index.h b/src/storage/phrase_index.h index 4deac16..94c8820 100644 --- a/src/storage/phrase_index.h +++ b/src/storage/phrase_index.h @@ -707,6 +707,17 @@ public: } return true; } + + int create_sub_phrase(guint8 index) { + SubPhraseIndex * & sub_phrase = m_sub_phrase_indices[index]; + if (sub_phrase) { + return ERROR_ALREADY_EXISTS; + } + + sub_phrase = new SubPhraseIndex; + + return ERROR_OK; + } }; }; |