diff options
author | Peng Wu <alexepico@gmail.com> | 2015-05-28 13:19:20 +0800 |
---|---|---|
committer | Peng Wu <alexepico@gmail.com> | 2015-05-28 13:19:20 +0800 |
commit | 4e829b1653e347bc171904c0f2c1e487403e3985 (patch) | |
tree | d83ce0d824e49b813d9355d568ca6391e2949e28 /src/storage/table_info.cpp | |
parent | 59fe2160a265ebecce051645bba78b1fe3ddf8eb (diff) | |
download | libpinyin-4e829b1653e347bc171904c0f2c1e487403e3985.tar.gz libpinyin-4e829b1653e347bc171904c0f2c1e487403e3985.tar.xz libpinyin-4e829b1653e347bc171904c0f2c1e487403e3985.zip |
update pinyin_guess_candidates function
Diffstat (limited to 'src/storage/table_info.cpp')
-rw-r--r-- | src/storage/table_info.cpp | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/storage/table_info.cpp b/src/storage/table_info.cpp index 3d57e15..ff499b3 100644 --- a/src/storage/table_info.cpp +++ b/src/storage/table_info.cpp @@ -139,6 +139,10 @@ static guint8 to_index_of_default_tables(const char * str) { assert(FALSE); } +static guint8 to_index_of_addon_tables(const char * str) { + return atoi(str); +} + static gchar * to_string(const char * str) { HANDLE(NULL); @@ -230,7 +234,7 @@ bool SystemTableInfo2::load(const char * filename) { if (ADDON_TABLE == target) { tables = m_addon_tables; - index = atoi(dictstr); + index = to_index_of_addon_tables(dictstr); } assert(0 <= index && index < PHRASE_INDEX_LIBRARY_COUNT); |