diff options
author | Peng Wu <alexepico@gmail.com> | 2016-01-07 15:30:53 +0800 |
---|---|---|
committer | Peng Wu <alexepico@gmail.com> | 2016-01-07 15:30:53 +0800 |
commit | 496a95e798e6783d35f96fa3b5bdb555db825a41 (patch) | |
tree | 52102ba1f49b6fc8abe70a34dd3dbdd59a9cf5d6 | |
parent | 2185ba0adf256e4fac611a5fafbff23ded0ef314 (diff) | |
download | libpinyin-496a95e798e6783d35f96fa3b5bdb555db825a41.tar.gz libpinyin-496a95e798e6783d35f96fa3b5bdb555db825a41.tar.xz libpinyin-496a95e798e6783d35f96fa3b5bdb555db825a41.zip |
update phrase_large_table3.h
-rw-r--r-- | src/storage/phrase_large_table3.h | 19 |
1 files changed, 5 insertions, 14 deletions
diff --git a/src/storage/phrase_large_table3.h b/src/storage/phrase_large_table3.h index 1bd450d..3200679 100644 --- a/src/storage/phrase_large_table3.h +++ b/src/storage/phrase_large_table3.h @@ -25,7 +25,7 @@ #include "novel_types.h" #include "memory_chunk.h" -typename Trie; +typedef struct _Trie Trie; namespace pinyin{ @@ -34,21 +34,12 @@ protected: Trie * m_index; MemoryChunk * m_content; - void reset(){ - if (m_index) { - trie_free(m_index); - m_index = NULL; - } + void reset(); - if ( m_chunk ){ - delete m_chunk; - m_chunk = NULL; - } - } public: PhraseLargeTable3(){ m_index = NULL; - m_chunk = NULL; + m_content = NULL; } ~PhraseLargeTable3(){ @@ -56,9 +47,9 @@ public: } /* load/store method */ - bool load(Trie * trie, MemoryChunk * chunk); + bool load(Trie * index, MemoryChunk * content); - bool store(Trie * new_trie, MemoryChunk * new_chunk); + bool store(Trie * new_index, MemoryChunk * new_content); bool load_text(FILE * file); |