diff options
author | Peng Wu <alexepico@gmail.com> | 2011-12-05 14:35:02 +0800 |
---|---|---|
committer | Peng Wu <alexepico@gmail.com> | 2011-12-05 14:35:02 +0800 |
commit | 0b4d5c66a57105ded0aa41ded6ea55c4edac24a7 (patch) | |
tree | 7b0b632e3907167934448a428ccd6bbd743ad185 /src | |
parent | a20107c9ca3aa1c9b8ed9b7a1f91335316bcd8a7 (diff) | |
download | libpinyin-0b4d5c66a57105ded0aa41ded6ea55c4edac24a7.tar.gz libpinyin-0b4d5c66a57105ded0aa41ded6ea55c4edac24a7.tar.xz libpinyin-0b4d5c66a57105ded0aa41ded6ea55c4edac24a7.zip |
fixes compile
Diffstat (limited to 'src')
-rw-r--r-- | src/storage/ngram.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/storage/ngram.cpp b/src/storage/ngram.cpp index 6455ae6..fa7ed8f 100644 --- a/src/storage/ngram.cpp +++ b/src/storage/ngram.cpp @@ -418,6 +418,8 @@ bool merge_single_gram(SingleGram * merged, const SingleGram * system, if (NULL == system && NULL == user) return false; + MemoryChunk & merged_chunk = merged->m_chunk; + if (NULL == system) { merged_chunk.set_chunk(user->m_chunk.begin(), user->m_chunk.size(), NULL); @@ -431,7 +433,6 @@ bool merge_single_gram(SingleGram * merged, const SingleGram * system, } /* clear merged. */ - MemoryChunk & merged_chunk = merged->m_chunk; merged_chunk.set_size(sizeof(guint32)); /* merge the origin info and delta info */ |