diff options
author | Peng Wu <alexepico@gmail.com> | 2017-02-10 15:23:40 +0800 |
---|---|---|
committer | Peng Wu <alexepico@gmail.com> | 2017-02-10 15:23:40 +0800 |
commit | 6f1fe4739fb5875cec915cd14c920173e143bba3 (patch) | |
tree | 35052666c42352341b8a4cd7fb43ef65a7a6b94c /src/lookup/phonetic_lookup.h | |
parent | 997085b873a2b1395a309bdebf52a3ca702087e5 (diff) | |
download | libpinyin-6f1fe4739fb5875cec915cd14c920173e143bba3.tar.gz libpinyin-6f1fe4739fb5875cec915cd14c920173e143bba3.tar.xz libpinyin-6f1fe4739fb5875cec915cd14c920173e143bba3.zip |
fixes class ForwardPhoneticConstraints
Diffstat (limited to 'src/lookup/phonetic_lookup.h')
-rw-r--r-- | src/lookup/phonetic_lookup.h | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/lookup/phonetic_lookup.h b/src/lookup/phonetic_lookup.h index e3d6c36..194ad17 100644 --- a/src/lookup/phonetic_lookup.h +++ b/src/lookup/phonetic_lookup.h @@ -422,11 +422,13 @@ protected: FacadePhraseIndex * m_phrase_index; public: - ForwardPhoneticConstraints() { + ForwardPhoneticConstraints(FacadePhraseIndex * phrase_index) { + m_phrase_index = phrase_index; m_constraints = g_array_new(TRUE, TRUE, sizeof(trellis_constraint_t)); } ~ForwardPhoneticConstraints() { + m_phrase_index = NULL; g_array_free(m_constraints, TRUE); m_constraints = NULL; } |