summaryrefslogtreecommitdiffstats
path: root/src/storage/phrase_index.h
diff options
context:
space:
mode:
authorPeng Wu <alexepico@gmail.com>2012-06-19 14:41:18 +0800
committerPeng Wu <alexepico@gmail.com>2012-06-19 14:41:18 +0800
commit3120e3f3208f3b0c9e30a811102e0d2ea9c5e29e (patch)
tree3a2a3d3ecb0ef125687c00773a6e06fe01d52c66 /src/storage/phrase_index.h
parent05945ae69172859cb26f33363faccb76cb189629 (diff)
downloadlibpinyin-3120e3f3208f3b0c9e30a811102e0d2ea9c5e29e.tar.gz
libpinyin-3120e3f3208f3b0c9e30a811102e0d2ea9c5e29e.tar.xz
libpinyin-3120e3f3208f3b0c9e30a811102e0d2ea9c5e29e.zip
fixes phrase library load
Diffstat (limited to 'src/storage/phrase_index.h')
-rw-r--r--src/storage/phrase_index.h11
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;
+ }
};
};