summaryrefslogtreecommitdiffstats
path: root/src/lookup/phonetic_lookup.h
diff options
context:
space:
mode:
authorPeng Wu <alexepico@gmail.com>2017-02-10 15:23:40 +0800
committerPeng Wu <alexepico@gmail.com>2017-02-10 15:23:40 +0800
commit6f1fe4739fb5875cec915cd14c920173e143bba3 (patch)
tree35052666c42352341b8a4cd7fb43ef65a7a6b94c /src/lookup/phonetic_lookup.h
parent997085b873a2b1395a309bdebf52a3ca702087e5 (diff)
downloadlibpinyin-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.h4
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;
}